!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define("rb_wixui.thunderbolt[VideoPlayer]",["react","reactDOM"],t):"object"==typeof exports?exports["rb_wixui.thunderbolt[VideoPlayer]"]=t(require("react"),require("react-dom")):e["rb_wixui.thunderbolt[VideoPlayer]"]=t(e.React,e.ReactDOM)}("undefined"!=typeof self?self:this,(function(e,t){return function(){var n={1835:function(e,t,n){var i=n(82016);e.exports=i.create("PlayableCover847694237",{classes:{root:"PlayableCover847694237__root",responsiveMode:"PlayableCover847694237__responsiveMode",overlay:"PlayableCover847694237__overlay",title:"PlayableCover847694237__title",poster:"PlayableCover847694237__poster",playButton:"PlayableCover847694237__playButton"},vars:{},stVars:{},keyframes:{},layers:{}},"",-1,e.id)},57061:function(e,t,n){var i=n(82016);e.exports=i.create("VideoPlayer2054936319",{classes:{root:"VideoPlayer2054936319__root",playerContainer:"VideoPlayer2054936319__playerContainer",facebookContainer:"VideoPlayer2054936319__facebookContainer",cover:"VideoPlayer2054936319__cover",vimeoContainer:"VideoPlayer2054936319__vimeoContainer",fadeEnter:"VideoPlayer2054936319__fadeEnter",fadeEnterActive:"VideoPlayer2054936319__fadeEnterActive",secondPoster:"VideoPlayer2054936319__secondPoster"},vars:{},stVars:{backgroundColor:"rgba(var(--backgroundColor, 0,0,0), var(--alpha-backgroundColor, 1))",font:"var(--font)",fontColor:"rgba(var(--fontColor, 255,255,255), var(--alpha-fontColor, 1))",borderColor:"rgba(var(--borderColor, 0,0,0), var(--alpha-borderColor, 1))",borderSize:"var(--borderSize)",boxShadow:"var(--boxShadow)",playButtonSize:"var(--playButtonSize)",playButtonMobileSize:"var(--playButtonMobileSize)",textSizeScale:"1px"},keyframes:{},layers:{}},"",-1,e.id)},82016:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createRenderable=t.create=void 0;t.create=function(e,t,n,i,o,r){const s={namespace:e,classes:t.classes,keyframes:t.keyframes,layers:t.layers,vars:t.vars,stVars:t.stVars,cssStates:function(e){const t=[];for(const n in e){const i=a(n,e[n]);i&&t.push(i)}return t.join(" ")},style:l,st:l,$id:o,$depth:i,$css:n};function a(t,n){if(!1===n||null==n||n!=n)return"";if(!0===n)return function(t){return`${e}--${t}`}(t);return function(t,n){return`${e}---${t}-${n.length}-${n.replace(/\s/gm,"_")}`}(t,n.toString())}function l(){const e=[];for(let t=0;t{const t=n(e);return t.indexOf("safari")>-1&&t.indexOf("version")>-1};const n=e=>e&&e.navigator&&e.navigator.userAgent?e.navigator.userAgent.toLowerCase():"";t.isIOS=e=>{const t=(e=>e&&e.navigator&&e.navigator.platform||"")(e);return!!t&&/iPad|iPhone|iPod/.test(t)}},4399:function(e){"use strict";var t=Object.prototype.hasOwnProperty,n="~";function i(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function r(e,t,i,r,s){if("function"!=typeof i)throw new TypeError("The listener must be a function");var a=new o(i,r||e,s),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],a]:e._events[l].push(a):(e._events[l]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,i,o=[];if(0===this._eventsCount)return o;for(i in e=this._events)t.call(e,i)&&o.push(n?i.slice(1):i);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},a.prototype.listeners=function(e){var t=n?n+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var o=0,r=i.length,s=new Array(r);o-1)throw new s.default(e,this._resolutionStack,"Cyclic dependencies detected.");if(!n)throw new s.default(e,this._resolutionStack);this._resolutionStack.push(e);var i=void 0,o=void 0;switch(n.lifetime){case l.default.TRANSIENT:o=n.resolve(this);break;case l.default.SINGLETON:void 0===(i=t.cache[e])?(o=n.resolve(this),t.cache[e]=o):o=i;break;case l.default.SCOPED:for(var r=0,a=this[u];r "),o="Could not resolve '".concat(e,"'.");return n&&(o+=" ".concat(n," \n\n Resolution path: ").concat(i)),o}(t,n,i))||this}return(0,i.__extends)(t,e),t}(o.default);t.default=r},49327:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(15769)),r=(0,i.__importDefault)(n(25450)),s=(0,i.__importDefault)(n(24553));t.default=(0,i.__assign)({createContainer:o.default,Lifetime:r.default},s.default)},24553:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asClass=t.asFunction=t.asValue=t.makeFluidInterface=t.PROPERTY_FOR_DEPENDENCIES=void 0;var i=n(92712),o=n(92712),r=(0,i.__importDefault)(n(69075)),s=(0,i.__importDefault)(n(25450));t.PROPERTY_FOR_DEPENDENCIES="dependencies";t.makeFluidInterface=function(e){var t=function(t){return e.lifetime=t,e};return{setLifetime:t,transient:function(){return t(s.default.TRANSIENT)},scoped:function(){return t(s.default.SCOPED)},singleton:function(){return t(s.default.SINGLETON)}}};t.asValue=function(e){return{resolve:function(){return e},lifetime:s.default.TRANSIENT}};t.asFunction=function(e,n){if("function"!=typeof e)throw new r.default("asFunction","function",typeof e);var i={lifetime:s.default.TRANSIENT};n=(0,o.__assign)({},i,n);var l=a(e),u={resolve:l,lifetime:n.lifetime};return u.resolve=l.bind(u),(0,o.__assign)(u,(0,t.makeFluidInterface)(u)),u};function a(e,n){n||(n=e);var i=n[t.PROPERTY_FOR_DEPENDENCIES]||[];return function(t){if(i.length>0){var n=i.reduce((function(e,n){return e[n]=t.resolve(n),e}),{});return e(n,t)}return e(t)}}t.asClass=function(e,n){if("function"!=typeof e)throw new r.default("asClass","class",typeof e);var l={lifetime:s.default.TRANSIENT};n=(0,o.__assign)({},l,n);var u=a((function(){for(var t=[],n=0;n0&&(this._attachedAdapter=this._playableAdapters[0],this._attachedAdapter.attach(this._video))},e.prototype._detachCurrentAdapter=function(){this._attachedAdapter&&(this._attachedAdapter.detach(),this._attachedAdapter=null)},Object.defineProperty(e.prototype,"attachedAdapter",{get:function(){return this._attachedAdapter},enumerable:!1,configurable:!0}),e.prototype.connectAdapter=function(e){this._detachCurrentAdapter(),this._resolvePlayableAdapters(e),this._connectAdapterToVideo()},e.prototype.destroy=function(){this._detachCurrentAdapter()},e}();t.default=s},31646:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=(0,n(92712).__importDefault)(n(64698)),o=n(24590),r=[(0,i.default)(o.MediaStreamType.HLS,o.MediaStreamDeliveryPriority.NATIVE_ADAPTIVE),(0,i.default)(o.MediaStreamType.DASH,o.MediaStreamDeliveryPriority.NATIVE_ADAPTIVE),(0,i.default)(o.MediaStreamType.MP4,o.MediaStreamDeliveryPriority.NATIVE_PROGRESSIVE),(0,i.default)(o.MediaStreamType.WEBM,o.MediaStreamDeliveryPriority.NATIVE_PROGRESSIVE),(0,i.default)(o.MediaStreamType.OGG,o.MediaStreamDeliveryPriority.NATIVE_PROGRESSIVE),(0,i.default)(o.MediaStreamType.MOV,o.MediaStreamDeliveryPriority.NATIVE_PROGRESSIVE),(0,i.default)(o.MediaStreamType.MKV,o.MediaStreamDeliveryPriority.NATIVE_PROGRESSIVE)];t.default=r},64698:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=n(24590),r=n(91211),s=n(33023),a=1,l=2,u=3,c=4;t.default=function(e,t){return function(){function n(e){this.mediaStreams=null,this.eventEmitter=e,this.currentLevel=0,this._bindCallbacks()}return n.isSupported=function(){return s.NativeEnvironmentSupport[e]},Object.defineProperty(n.prototype,"currentUrl",{get:function(){return this.mediaStreams[this.currentLevel].url},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"syncWithLiveTime",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDynamicContent",{get:function(){return!isFinite(this.video.duration)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDynamicContentEnded",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isSyncWithLive",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isSeekAvailable",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"mediaStreamDeliveryPriority",{get:function(){return t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"mediaStreamType",{get:function(){return e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"debugInfo",{get:function(){if(this.video){var e=this.video,t=e.buffered,n=e.currentTime,o=(0,r.geOverallBufferLength)(t),s=(0,r.getNearestBufferSegmentInfo)(t,n);return(0,i.__assign)((0,i.__assign)({},this.mediaStreams[0]),{deliveryPriority:this.mediaStreamDeliveryPriority,overallBufferLength:o,nearestBufferSegInfo:s})}return{}},enumerable:!1,configurable:!0}),n.prototype._bindCallbacks=function(){this._broadcastError=this._broadcastError.bind(this)},n.prototype.canPlay=function(t){return t===e},n.prototype.setMediaStreams=function(e){this.mediaStreams=e},n.prototype._logError=function(t,n){this.eventEmitter.emitAsync(o.VideoEvent.ERROR,{errorType:t,streamType:e,streamProvider:"native",errorInstance:n})},n.prototype._broadcastError=function(){var e=this.video.error;if(e)switch(e.code){case a:break;case l:this._logError(o.Error.CONTENT_LOAD,e);break;case u:this._logError(o.Error.MEDIA,e);break;case c:this._logError(o.Error.CONTENT_LOAD,e);break;default:this._logError(o.Error.UNKNOWN,e)}else this._logError(o.Error.UNKNOWN,null)},n.prototype.attach=function(e){this.video=e,this.video.addEventListener("error",this._broadcastError),this.video.src=this.mediaStreams[this.currentLevel].url},n.prototype.detach=function(){this.video.removeEventListener("error",this._broadcastError),this.video.removeAttribute("src"),this.video=null},n}()}},68497:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=n(68785),r=(0,i.__importDefault)(n(33320)),s=(0,i.__importDefault)(n(3398)),a=n(24590),l=(0,i.__importDefault)(n(98471)),u=(0,i.__importDefault)(n(350)),c=n(56398),d=function(e){e.preventDefault()},h=function(){function e(e){var t=e.eventEmitter,n=e.config,i=e.availablePlaybackAdapters,o=void 0===i?[]:i;this._createVideoTag(n),this._eventEmitter=t,this._availablePlaybackAdapters=o,this._stateEngine=new r.default(this._eventEmitter,this._video),this._nativeEventsBroadcaster=new s.default(t,this._video),this._adapterStrategy=new l.default(this._eventEmitter,this._video,this._availablePlaybackAdapters)}return e.prototype._createVideoTag=function(e){var t=e.videoElement,n=e.preventContextMenu;t&&"VIDEO"===t.tagName?this._video=t:this._video=document.createElement("video"),n&&this._video.addEventListener("contextmenu",d)},e.prototype.play=function(){var e=this;this._eventEmitter.emitAsync(u.default.PLAY_REQUEST),this._pauseRequested=!1,this._playPromise||(this._playPromise=this._video.play(),void 0!==this._playPromise&&this._playPromise.then((function(){e._playPromise=null,e._pauseRequested&&e.pause()})).catch((function(t){e._eventEmitter.emitAsync(u.default.PLAY_ABORTED,t),e._playPromise=null})))},e.prototype.pause=function(){this._playPromise?this._pauseRequested=!0:(this._video.pause(),this._pauseRequested=!1)},e.prototype.setMute=function(e){this._video.muted=e,this._nativeEventsBroadcaster.checkVolumeChangeAfterLoadStart()},e.prototype.setAutoplay=function(e){this._video.autoplay=e},e.prototype.setInline=function(e){e?this._video.setAttribute("playsinline","true"):this._video.removeAttribute("playsinline")},e.prototype.setCrossOrigin=function(e){e?this._video.setAttribute("crossorigin",e):this._video.removeAttribute("crossorigin")},e.prototype.setCurrentTime=function(e){this._video.currentTime=e},e.prototype.setVolume=function(e){this._video.volume=e,this._nativeEventsBroadcaster.checkVolumeChangeAfterLoadStart()},e.prototype.setLoop=function(e){this._video.loop=e},e.prototype.setPlaybackRate=function(e){this._video.playbackRate=e},e.prototype.setPreload=function(e){void 0===e&&(e=o.PreloadType.AUTO),this._video.preload=e||o.PreloadType.AUTO},e.prototype.setSrc=function(e,t){this._stateEngine.clearTimestamps(),this._adapterStrategy.connectAdapter(e),this._stateEngine.setState(a.EngineState.SRC_SET),"function"==typeof t&&t()},e.prototype.syncWithLive=function(){this.attachedAdapter&&this.attachedAdapter.isDynamicContent&&!this.attachedAdapter.isDynamicContentEnded&&!this.isSyncWithLive&&(this.setCurrentTime(this.attachedAdapter.syncWithLiveTime),this.play())},e.prototype.getElement=function(){return this._video},e.prototype._getViewDimensions=function(){return{width:this._video.offsetWidth,height:this._video.offsetHeight}},Object.defineProperty(e.prototype,"volume",{get:function(){return this._video.volume},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._video.currentTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this._video.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"autoplay",{get:function(){return this._video.autoplay},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"crossOrigin",{get:function(){return this._video.getAttribute("crossorigin")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playbackRate",{get:function(){return this._video.playbackRate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffered",{get:function(){return this._video.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"preload",{get:function(){return this._video.preload},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPaused",{get:function(){return this._video.paused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isMuted",{get:function(){return Boolean(this._video.muted)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnded",{get:function(){return this._video.ended},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isInline",{get:function(){return Boolean(this._video.getAttribute("playsinline"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAutoplay",{get:function(){return this._video.autoplay},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isLoop",{get:function(){return this._video.loop},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isMetadataLoaded",{get:function(){return this._stateEngine.isMetadataLoaded},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDynamicContent",{get:function(){return!!this.attachedAdapter&&this.attachedAdapter.isDynamicContent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDynamicContentEnded",{get:function(){return!!this.attachedAdapter&&this.attachedAdapter.isDynamicContentEnded},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSeekAvailable",{get:function(){return!!this.attachedAdapter&&this.attachedAdapter.isSeekAvailable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSyncWithLive",{get:function(){return!!this.attachedAdapter&&this.attachedAdapter.isSyncWithLive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPreloadActive",{get:function(){return!((0,c.isIPad)()||(0,c.isIPhone)()||(0,c.isIPod)()||(0,c.isAndroid)())&&"none"!==this.preload},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAutoPlayActive",{get:function(){return!((0,c.isIPad)()||(0,c.isIPhone)()||(0,c.isIPod)()||(0,c.isAndroid)())&&this.isAutoplay},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"videoHeight",{get:function(){return this._video.videoHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"videoWidth",{get:function(){return this._video.videoWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"src",{get:function(){return this.attachedAdapter&&this.attachedAdapter.currentUrl},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentState",{get:function(){return this._stateEngine.state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attachedAdapter",{get:function(){return this._adapterStrategy.attachedAdapter},enumerable:!1,configurable:!0}),e.prototype.getDebugInfo=function(){var e,t=this.duration,n=this.currentTime;return this.attachedAdapter&&(e=this.attachedAdapter.debugInfo),(0,i.__assign)((0,i.__assign)({},e),{duration:t,currentTime:n,loadingStateTimestamps:this._stateEngine.stateTimestamps,viewDimensions:this._getViewDimensions(),output:"html5video"})},e.prototype.destroy=function(){this._nativeEventsBroadcaster.destroy(),this._adapterStrategy.destroy(),this._video.removeEventListener("contextmenu",d),this._video.parentNode&&this._video.parentNode.removeChild(this._video),this._video=null},e.moduleName="nativeOutput",e.dependencies=["eventEmitter","config","availablePlaybackAdapters"],e}();t.default=h},3398:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NATIVE_VIDEO_TO_BROADCAST=void 0;var i=n(24590);t.NATIVE_VIDEO_TO_BROADCAST=["loadstart","progress","error","stalled","suspend","durationchange","timeupdate","volumechange","seeking"];var o=function(){function e(e,t){this._eventEmitter=e,this._video=t,this._currentMute=this._video.muted,this._currentVolume=this._video.volume,this._bindCallbacks(),this._bindEvents()}return e.prototype._bindCallbacks=function(){this._processEventFromVideo=this._processEventFromVideo.bind(this)},e.prototype._bindEvents=function(){var e=this;t.NATIVE_VIDEO_TO_BROADCAST.forEach((function(t){return e._video.addEventListener(t,e._processEventFromVideo)}))},e.prototype._unbindEvents=function(){var e=this;t.NATIVE_VIDEO_TO_BROADCAST.forEach((function(t){return e._video.removeEventListener(t,e._processEventFromVideo)}))},e.prototype._processEventFromVideo=function(e){void 0===e&&(e={});var t=this._video;switch(e.type){case"loadstart":this._shouldCheckVolume&&this._checkVolumeChanges();break;case"progress":this._eventEmitter.emitAsync(i.VideoEvent.CHUNK_LOADED);break;case"stalled":this._eventEmitter.emitAsync(i.VideoEvent.UPLOAD_STALLED);break;case"suspend":this._eventEmitter.emitAsync(i.VideoEvent.UPLOAD_SUSPEND);break;case"seeking":this._eventEmitter.emitAsync(i.VideoEvent.SEEK_IN_PROGRESS,t.currentTime);break;case"durationchange":this._eventEmitter.emitAsync(i.VideoEvent.DURATION_UPDATED,t.duration);break;case"timeupdate":this._eventEmitter.emitAsync(i.VideoEvent.CURRENT_TIME_UPDATED,t.currentTime);break;case"volumechange":this._shouldCheckVolume&&(this._shouldCheckVolume=!1),this._checkVolumeChanges()}},e.prototype._checkVolumeChanges=function(){var e=this._video;this._currentVolume!==e.volume&&(this._currentVolume=100*e.volume,this._eventEmitter.emitAsync(i.VideoEvent.VOLUME_CHANGED,this._currentVolume)),this._currentMute!==e.muted&&(this._currentMute=e.muted,this._eventEmitter.emitAsync(i.VideoEvent.MUTE_CHANGED,this._currentMute)),this._eventEmitter.emitAsync(i.VideoEvent.SOUND_STATE_CHANGED,{volume:e.volume,muted:e.muted})},e.prototype.checkVolumeChangeAfterLoadStart=function(){this._shouldCheckVolume=!0},e.prototype.destroy=function(){this._unbindEvents()},e}();t.default=o},33320:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NATIVE_VIDEO_EVENTS_TO_STATE=void 0;var i=n(56398),o=n(24590);t.NATIVE_VIDEO_EVENTS_TO_STATE=["loadstart","loadedmetadata","canplay","play","playing","pause","ended","waiting","seeking","seeked"];var r=function(){function e(e,t){this._eventEmitter=e,this._video=t,this._currentState=null,this._isMetadataLoaded=!1,this._statesTimestamps={},this._bindCallbacks(),this._bindEvents()}return e.prototype._bindCallbacks=function(){this._processEventFromVideo=this._processEventFromVideo.bind(this)},e.prototype._bindEvents=function(){var e=this;t.NATIVE_VIDEO_EVENTS_TO_STATE.forEach((function(t){e._video.addEventListener(t,e._processEventFromVideo)}))},e.prototype._unbindEvents=function(){var e=this;t.NATIVE_VIDEO_EVENTS_TO_STATE.forEach((function(t){return e._video.removeEventListener(t,e._processEventFromVideo)}))},e.prototype.clearTimestamps=function(){this._statesTimestamps={}},e.prototype._setInitialTimeStamp=function(){this._initialTimeStamp=Date.now()},e.prototype._setStateTimestamp=function(e){this._statesTimestamps[e]||(this._statesTimestamps[e]=Date.now()-this._initialTimeStamp,this._setInitialTimeStamp())},Object.defineProperty(e.prototype,"stateTimestamps",{get:function(){return this._statesTimestamps},enumerable:!1,configurable:!0}),e.prototype._processEventFromVideo=function(e){void 0===e&&(e={});var t=this._video;switch(e.type){case"loadstart":this._setInitialTimeStamp(),this.setState(o.EngineState.LOAD_STARTED);break;case"loadedmetadata":this._setStateTimestamp(o.EngineState.METADATA_LOADED),this.setState(o.EngineState.METADATA_LOADED),this._isMetadataLoaded=!0;break;case"canplay":this._currentState===o.EngineState.METADATA_LOADED&&(this._setStateTimestamp(o.EngineState.READY_TO_PLAY),this.setState(o.EngineState.READY_TO_PLAY));break;case"play":this.setState(o.EngineState.PLAY_REQUESTED);break;case"playing":(0,i.isSafari)()&&t.paused||this.setState(o.EngineState.PLAYING);break;case"waiting":this.setState(o.EngineState.WAITING);break;case"pause":(0,i.isSafari)()?t.played.length&&this.setState(o.EngineState.PAUSED):this.setState(o.EngineState.PAUSED);break;case"ended":this.setState(o.EngineState.ENDED);break;case"seeking":this.setState(o.EngineState.SEEK_IN_PROGRESS);break;case"seeked":this.setState(t.paused?o.EngineState.PAUSED:o.EngineState.PLAYING)}},e.prototype.setState=function(e){e!==this._currentState&&(this._currentState!==o.EngineState.METADATA_LOADED||e!==o.EngineState.SEEK_IN_PROGRESS&&e!==o.EngineState.PAUSED)&&(this._eventEmitter.emitAsync(o.VideoEvent.STATE_CHANGED,{prevState:this._currentState,nextState:e}),this._eventEmitter.emitAsync(e),this._currentState=e)},Object.defineProperty(e.prototype,"isMetadataLoaded",{get:function(){return this._isMetadataLoaded},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._currentState},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){this._unbindEvents()},e}();t.default=r},46919:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(17022)),r=n(24590),s=function(){function e(e){var t=e.eventEmitter,n=e.nativeOutput,i=e.config;this._eventEmitter=t,this._config=i,this._defaultOutput=n,this._output=n,this._applyConfig(this._config)}return e.prototype._applyConfig=function(e){void 0===e&&(e={});var t=e.preload,n=e.autoplay,i=e.loop,o=e.muted,r=e.volume,s=e.playsinline,a=e.crossOrigin,l=e.src;this.setPreload(t),this.setAutoplay(n),this.setLoop(i),this.setMute(o),this.setVolume(r),this.setPlaysinline(s),this.setCrossOrigin(a),l&&this.setSrc(l)},e.prototype.getElement=function(){return this._output.getElement()},Object.defineProperty(e.prototype,"isDynamicContent",{get:function(){return this._output.isDynamicContent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDynamicContentEnded",{get:function(){return this._output.isDynamicContentEnded},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSeekAvailable",{get:function(){return this._output.isSeekAvailable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isMetadataLoaded",{get:function(){return this._output.isMetadataLoaded},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPreloadActive",{get:function(){return this._output.isPreloadActive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAutoPlayActive",{get:function(){return this._output.isAutoPlayActive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isSyncWithLive",{get:function(){return this._output.isSyncWithLive},enumerable:!1,configurable:!0}),e.prototype.setSrc=function(e,t){e!==this.getSrc()&&this._output.setSrc(e,t)},e.prototype.getSrc=function(){return this._output.src},e.prototype.reset=function(){this.pause(),this.seekTo(0),this._eventEmitter.emitAsync(r.VideoEvent.RESET)},e.prototype.play=function(){this._output.play()},e.prototype.pause=function(){this._output.pause()},e.prototype.togglePlayback=function(){this.isPaused?this.play():this.pause()},e.prototype.resetPlayback=function(){this.pause(),this.seekTo(0),this._eventEmitter.emitAsync(r.VideoEvent.RESET)},Object.defineProperty(e.prototype,"isPaused",{get:function(){return this._output.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnded",{get:function(){return this._output.isEnded},enumerable:!1,configurable:!0}),e.prototype.syncWithLive=function(){this._output.syncWithLive()},e.prototype.seekForward=function(e){var t=this.getDuration();if(t){var n=this.getCurrentTime();this.seekTo(Math.min(n+e,t))}},e.prototype.seekBackward=function(e){if(this.getDuration()){var t=this.getCurrentTime();this.seekTo(Math.max(t-e,0))}},e.prototype.setVolume=function(e){var t=Number(e),n=isNaN(t)?1:Math.max(0,Math.min(Number(e)/100,1));this._output.setVolume(n)},e.prototype.getVolume=function(){return 100*this._output.volume},e.prototype.increaseVolume=function(e){this.setVolume(this.getVolume()+e)},e.prototype.decreaseVolume=function(e){this.setVolume(this.getVolume()-e)},e.prototype.setMute=function(e){this._output.setMute(e)},e.prototype.mute=function(){this.setMute(!0)},e.prototype.unmute=function(){this.setMute(!1)},Object.defineProperty(e.prototype,"isMuted",{get:function(){return this._output.isMuted},enumerable:!1,configurable:!0}),e.prototype.setAutoplay=function(e){this._output.setAutoplay(e)},e.prototype.getAutoplay=function(){return this._output.isAutoplay},e.prototype.setLoop=function(e){this._output.setLoop(e)},e.prototype.getLoop=function(){return this._output.isLoop},e.prototype.setPlaybackRate=function(e){this._output.setPlaybackRate(e)},e.prototype.getPlaybackRate=function(){return this._output.playbackRate},e.prototype.setPreload=function(e){this._output.setPreload(e)},e.prototype.getPreload=function(){return this._output.preload},e.prototype.getCurrentTime=function(){return this._output.currentTime},e.prototype.seekTo=function(e){this._output.setCurrentTime(e)},e.prototype.getDuration=function(){return this._output.duration||0},e.prototype.getVideoWidth=function(){return this._output.videoWidth},e.prototype.getVideoHeight=function(){return this._output.videoHeight},e.prototype.getBuffered=function(){return this._output.buffered},e.prototype.setPlaysinline=function(e){this._output.setInline(e)},e.prototype.getPlaysinline=function(){return this._output.isInline},e.prototype.setCrossOrigin=function(e){this._output.setCrossOrigin(e)},e.prototype.getCrossOrigin=function(){return this._output.crossOrigin},e.prototype.getCurrentState=function(){return this._output.currentState},e.prototype.getDebugInfo=function(){return this._output.getDebugInfo()},e.prototype.destroy=function(){},e.prototype.changeOutput=function(e,t){var n=this.getSrc();return this._output.pause(),this._output=e,this._applyConfig(this._config),this._output.setSrc(n,t)},e.prototype.resetOutput=function(){var e=!this._output.isPaused,t=this._output.currentTime;this._output=this._defaultOutput,this._output.setCurrentTime(t),e&&this._output.play()},e.moduleName="engine",e.dependencies=["eventEmitter","config","nativeOutput"],(0,i.__decorate)([(0,o.default)()],e.prototype,"setSrc",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"getSrc",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"reset",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"play",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"pause",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"togglePlayback",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"resetPlayback",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"isPaused",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"isEnded",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"syncWithLive",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"seekForward",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"seekBackward",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"setVolume",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"getVolume",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"increaseVolume",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"decreaseVolume",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"mute",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"unmute",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"isMuted",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"setAutoplay",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"getAutoplay",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"setLoop",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"getLoop",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"setPlaybackRate",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"getPlaybackRate",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"setPreload",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"getPreload",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"getCurrentTime",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"seekTo",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"getDuration",null),(0,i.__decorate)([(0,o.default)("getVideoRealWidth")],e.prototype,"getVideoWidth",null),(0,i.__decorate)([(0,o.default)("getVideoRealHeight")],e.prototype,"getVideoHeight",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"setPlaysinline",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"getPlaysinline",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"setCrossOrigin",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"getCrossOrigin",null),(0,i.__decorate)([(0,o.default)("getPlaybackState")],e.prototype,"getCurrentState",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"getDebugInfo",null),e}();t.default=s},68785:function(e,t){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.CrossOriginValue=t.PreloadType=void 0,function(e){e.NONE="none",e.METADATA="metadata",e.AUTO="auto"}(n||(n={})),t.PreloadType=n,function(e){e.ANONYMUS="anonymous",e.CREDENTIALS="use-credentials"}(i||(i={})),t.CrossOriginValue=i},34772:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveAdapters=void 0;var i=n(24590);t.resolveAdapters=function(e,t){var n=[],o=function(e){var t={};return e.forEach((function(e){var n=e.type||i.MimeToStreamTypeMap[e.mimeType];n&&(Array.isArray(t[n])||(t[n]=[]),t[n].push({url:e.url,type:n}))})),t}(e),r=Object.keys(o);return t.forEach((function(e){for(var t=0;t'}}},32860:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.containerTemplate=void 0;var i=(0,n(92712).__importDefault)(n(71389)),o=i.default.default?i.default.default:i.default;t.containerTemplate=o},48783:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=(0,n(92712).__importDefault)(n(29413)),r="undefined"!=typeof document&&"onfocusin"in document,s=r?"focusin":"focus",a=r?"focusout":"blur",l=null,u=null,c={pointer:!1,key:!1,script:!1,initial:!1};function d(e){var t="";if(e.type===s){var n=i.get();t=u||n.pointer&&"pointer"||n.key&&"key"||"script"}else"initial"===e.type&&(t="initial");document.documentElement.setAttribute("data-playable-focus-source",t),e.type!==a&&(c[t]=!0,l=t)}function h(){return l}function p(e){return c[e]}function f(e){u=e}function _(){u=!1}t.default={engage:function(){return document.documentElement.addEventListener(s,d,!0),document.documentElement.addEventListener(a,d,!0),i=o.default.engage(),d({type:"initial"}),{used:p,current:h,lock:f,unlock:_}},disengage:function(){d({type:a}),l=u=null,Object.keys(c).forEach((function(e){c[e]=!1})),o.default.disengage(),document.documentElement.removeEventListener(s,d,!0),document.documentElement.removeEventListener(a,d,!0),document.documentElement.removeAttribute("data-playable-focus-source")}}},51471:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="undefined"!=typeof window&&window.document&&"unknown"!=typeof window.document.activeElement,i="focus-within";t.default=function(e,t,o){var r,s,a,l,u=(l=function(){var l,u=n?document.activeElement:null;if(r=!1,s!==u){if(s=u,l=e,Array.prototype.slice.call(l.getElementsByClassName(i)).forEach((function(e){e.classList.remove(i)})),!e.contains(u))return void(a&&(a=!1,o()));a||(a=!0,t()),function(e,t){for(var n=t;n!==e&&void 0!==n.classList;)n.classList.add(i),n=n.parentNode}(e,u)}},function(){r||(requestAnimationFrame(l),r=!0)});return e.addEventListener("focus",u,!0),e.addEventListener("blur",u,!0),u(),function(){e.removeEventListener("focus",u,!0),e.removeEventListener("blur",u,!0)}}},29413:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=0,i=0,o=["touchstart","pointerdown","MSPointerDown","mousedown"],r=["touchend","touchcancel","pointerup","MSPointerUp","pointercancel","MSPointerCancel","mouseup"];function s(){n=0,i=0}function a(e){!1!==e.isPrimary&&(n+=1)}function l(e){!1!==e.isPrimary&&(e.touches?n=e.touches.length:(window.setImmediate||window.setTimeout)((function(){n=Math.max(n-1,0)})))}function u(e){switch(e.keyCode||e.which){case 16:case 17:case 18:case 91:case 93:return}i+=1}function c(e){switch(e.keyCode||e.which){case 16:case 17:case 18:case 91:case 93:return}(window.setImmediate||window.setTimeout)((function(){i=Math.max(i-1,0)}))}function d(){return{pointer:Boolean(n),key:Boolean(i)}}t.default={engage:function(){return window.addEventListener("blur",s,!1),document.documentElement.addEventListener("keydown",u,!0),document.documentElement.addEventListener("keyup",c,!0),o.forEach((function(e){document.documentElement.addEventListener(e,a,!0)})),r.forEach((function(e){document.documentElement.addEventListener(e,l,!0)})),{get:d}},disengage:function(){n=i=0,window.removeEventListener("blur",s,!1),document.documentElement.removeEventListener("keydown",u,!0),document.documentElement.removeEventListener("keyup",c,!0),o.forEach((function(e){document.documentElement.removeEventListener(e,a,!0)})),r.forEach((function(e){document.documentElement.removeEventListener(e,l,!0)}))}}},1876:function(e,t,n){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0});var o=n(24590),r=((i={})[o.TextLabel.LOGO_LABEL]="Watch on site",i[o.TextLabel.LOGO_TOOLTIP]="Watch On Site",i[o.TextLabel.LIVE_INDICATOR_TEXT]=function(e){return e.isEnded?"Live Ended":"Live"},i[o.TextLabel.LIVE_SYNC_LABEL]="Sync to live",i[o.TextLabel.LIVE_SYNC_TOOLTIP]="Sync to Live",i[o.TextLabel.PAUSE_CONTROL_LABEL]="Pause",i[o.TextLabel.PLAY_CONTROL_LABEL]="Play",i[o.TextLabel.PROGRESS_CONTROL_LABEL]="Progress control",i[o.TextLabel.PROGRESS_CONTROL_VALUE]=function(e){var t=e.percent;return"Already played ".concat(t,"%")},i[o.TextLabel.MUTE_CONTROL_LABEL]="Mute",i[o.TextLabel.MUTE_CONTROL_TOOLTIP]="Mute",i[o.TextLabel.UNMUTE_CONTROL_LABEL]="Unmute",i[o.TextLabel.UNMUTE_CONTROL_TOOLTIP]="Unmute",i[o.TextLabel.VOLUME_CONTROL_LABEL]="Volume control",i[o.TextLabel.VOLUME_CONTROL_VALUE]=function(e){var t=e.volume;return"Volume is ".concat(t,"%")},i[o.TextLabel.ENTER_FULL_SCREEN_LABEL]="Enter full screen",i[o.TextLabel.ENTER_FULL_SCREEN_TOOLTIP]="Enter Full Screen",i[o.TextLabel.EXIT_FULL_SCREEN_LABEL]="Exit full screen",i[o.TextLabel.EXIT_FULL_SCREEN_TOOLTIP]="Exit Full Screen",i[o.TextLabel.ENTER_PICTURE_IN_PICTURE_LABEL]="Play Picture-in-Picture",i[o.TextLabel.ENTER_PICTURE_IN_PICTURE_TOOLTIP]="Play Picture-in-Picture",i[o.TextLabel.EXIT_PICTURE_IN_PICTURE_LABEL]="Exit Picture-in-Picture",i[o.TextLabel.EXIT_PICTURE_IN_PICTURE_TOOLTIP]="Exit Picture-in-Picture",i[o.TextLabel.DOWNLOAD_BUTTON_LABEL]="Download video",i[o.TextLabel.DOWNLOAD_BUTTON_TOOLTIP]="Download Video",i);t.default=r},47455:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(1876)),r=function(){function e(e){var t=e.config;this._textMap=(0,i.__assign)((0,i.__assign)({},o.default),t.texts)}return e.prototype.get=function(e,t,n){if(this._textMap){var i=this._textMap[e]||n;return"function"==typeof i?i(t):i}},e.prototype.destroy=function(){this._textMap=null},e.moduleName="textMap",e.dependencies=["config"],e}();t.default=r},28523:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(17022)),r=(0,i.__importDefault)(n(48707)),s=n(24590),a=function(){function e(e){this._isBlockFocused=!1,this.isHidden=!1;var t=e.eventEmitter;this._eventEmitter=t,this._bindViewCallbacks(),this._initUI(this._getControlElements(e)),this._bindEvents()}return e.prototype._getControlElements=function(e){var t=e.playControl,n=e.progressControl,i=e.timeControl,o=e.volumeControl,r=e.fullScreenControl,s=e.logo,a=e.downloadButton,l=e.pictureInPictureControl;return{play:t.getElement(),progress:n.getElement(),time:i.getElement(),volume:o.getElement(),fullScreen:r.getElement(),download:a.getElement(),logo:s.getElement(),pictureInPicture:l.getElement()}},e.prototype.getElement=function(){return this.view.getElement()},e.prototype.addControl=function(e,t,n){var i=(n||{}).position,o=void 0===i?"right":i;this.view.addControl(e,t,o)},e.prototype._initUI=function(t){var n={elements:t,callbacks:{onBlockMouseMove:this._setFocusState,onBlockMouseOut:this._removeFocusState}};this.view=new e.View(n),this.hideLogo(),this.hideDownloadButton()},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[s.UIEvent.FULL_SCREEN_STATE_CHANGED,this._removeFocusState]],this)},e.prototype._bindViewCallbacks=function(){this._setFocusState=this._setFocusState.bind(this),this._removeFocusState=this._removeFocusState.bind(this)},e.prototype._setFocusState=function(){this._isBlockFocused=!0},e.prototype._removeFocusState=function(){this._isBlockFocused=!1},Object.defineProperty(e.prototype,"isFocused",{get:function(){return this._isBlockFocused},enumerable:!1,configurable:!0}),e.prototype.showContent=function(){this.view.showContent()},e.prototype.hideContent=function(){this.view.hideContent()},e.prototype.hide=function(){this.isHidden=!0,this.view.hide()},e.prototype.show=function(){this.isHidden=!1,this.view.show()},e.prototype.setAlwaysShowLogo=function(e){this.view.setShouldLogoShowAlwaysFlag(e)},e.prototype.hideLogo=function(){this.view.hideLogo()},e.prototype.showLogo=function(){this.view.showLogo()},e.prototype.showPlayControl=function(){this.view.showPlayControl()},e.prototype.showVolumeControl=function(){this.view.showVolumeControl()},e.prototype.showTimeControl=function(){this.view.showTimeControl()},e.prototype.showFullScreenControl=function(){this.view.showFullScreenControl()},e.prototype.showPictureInPictureControl=function(){this.view.showPictureInPictureControl()},e.prototype.showProgressControl=function(){this.view.showProgressControl()},e.prototype.showDownloadButton=function(){this.view.showDownloadButton()},e.prototype.hidePlayControl=function(){this.view.hidePlayControl()},e.prototype.hideVolumeControl=function(){this.view.hideVolumeControl()},e.prototype.hideTimeControl=function(){this.view.hideTimeControl()},e.prototype.hideFullScreenControl=function(){this.view.hideFullScreenControl()},e.prototype.hidePictureInPictureControl=function(){this.view.hidePictureInPictureControl()},e.prototype.hideProgressControl=function(){this.view.hideProgressControl()},e.prototype.hideDownloadButton=function(){this.view.hideDownloadButton()},e.prototype.destroy=function(){this._unbindEvents(),this.view.destroy()},e.moduleName="bottomBlock",e.View=r.default,e.dependencies=["playControl","progressControl","timeControl","volumeControl","fullScreenControl","logo","downloadButton","eventEmitter","pictureInPictureControl"],(0,i.__decorate)([(0,o.default)()],e.prototype,"setAlwaysShowLogo",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"hideLogo",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"showLogo",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"showPlayControl",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"showVolumeControl",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"showTimeControl",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"showFullScreenControl",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"showPictureInPictureControl",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"showProgressControl",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"showDownloadButton",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"hidePlayControl",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"hideVolumeControl",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"hideTimeControl",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"hideFullScreenControl",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"hidePictureInPictureControl",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"hideProgressControl",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"hideDownloadButton",null),e}();t.default=a},48707:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(30313)),r=(0,i.__importDefault)(n(61045)),s=(0,i.__importDefault)(n(46484)),a=(0,i.__importDefault)(n(23802)),l=n(53504),u=(0,i.__importDefault)(n(5024)),c=function(e){function t(t){var n=e.call(this)||this,i=t.callbacks,o=t.elements;return n._callbacks=i,n._initDOM(o),n._bindEvents(),n}return(0,i.__extends)(t,e),t.prototype._initDOM=function(e){this._$rootElement=(0,r.default)((0,l.bottomBlockTemplate)({styles:this.styleNames})),this._$leftControllsContainer=(0,s.default)(this._$rootElement,"controls-container-left"),this._$rightControllsContainer=(0,s.default)(this._$rootElement,"controls-container-right");var t=(0,s.default)(this._$rootElement,"play-container"),n=(0,s.default)(this._$rootElement,"volume-container"),i=(0,s.default)(this._$rootElement,"time-container"),o=(0,s.default)(this._$rootElement,"full-screen-container"),a=(0,s.default)(this._$rootElement,"logo-container"),u=(0,s.default)(this._$rootElement,"progress-bar-container"),c=(0,s.default)(this._$rootElement,"download-container"),d=(0,s.default)(this._$rootElement,"picture-in-picture-container");t.appendChild(e.play),n.appendChild(e.volume),i.appendChild(e.time),o.appendChild(e.fullScreen),a.appendChild(e.logo),u.appendChild(e.progress),c.appendChild(e.download),d.appendChild(e.pictureInPicture)},t.prototype._preventClickPropagation=function(e){e.stopPropagation()},t.prototype._bindEvents=function(){this._$rootElement.addEventListener("click",this._preventClickPropagation),this._$rootElement.addEventListener("mousemove",this._callbacks.onBlockMouseMove),this._$rootElement.addEventListener("mouseleave",this._callbacks.onBlockMouseOut)},t.prototype._unbindEvents=function(){this._$rootElement.removeEventListener("click",this._preventClickPropagation),this._$rootElement.removeEventListener("mousemove",this._callbacks.onBlockMouseMove),this._$rootElement.removeEventListener("mouseleave",this._callbacks.onBlockMouseOut)},t.prototype.addControl=function(e,t,n){var i=document.createElement("div");i.setAttribute("data-playable-hook","additional-".concat(e)),i.classList.add(this.styleNames.additionalButton),i.appendChild(t),"left"!==n?this._$rightControllsContainer.insertBefore(i,this._$rightControllsContainer.children[0]):this._$leftControllsContainer.appendChild(i)},t.prototype.setShouldLogoShowAlwaysFlag=function(e){(0,a.default)(this._$rootElement,this.styleNames.showLogoAlways,e),this.showLogo()},t.prototype.showPlayControl=function(){this._$rootElement.classList.remove(this.styleNames.playControlHidden)},t.prototype.hidePlayControl=function(){this._$rootElement.classList.add(this.styleNames.playControlHidden)},t.prototype.showTimeControl=function(){this._$rootElement.classList.remove(this.styleNames.timeControlHidden)},t.prototype.hideTimeControl=function(){this._$rootElement.classList.add(this.styleNames.timeControlHidden)},t.prototype.showVolumeControl=function(){this._$rootElement.classList.remove(this.styleNames.volumeControlHidden)},t.prototype.hideVolumeControl=function(){this._$rootElement.classList.add(this.styleNames.volumeControlHidden)},t.prototype.showFullScreenControl=function(){this._$rootElement.classList.remove(this.styleNames.fullScreenControlHidden)},t.prototype.hideFullScreenControl=function(){this._$rootElement.classList.add(this.styleNames.fullScreenControlHidden)},t.prototype.showLogo=function(){this._$rootElement.classList.remove(this.styleNames.logoHidden)},t.prototype.hideLogo=function(){this._$rootElement.classList.add(this.styleNames.logoHidden)},t.prototype.showProgressControl=function(){this._$rootElement.classList.remove(this.styleNames.progressControlHidden)},t.prototype.hideProgressControl=function(){this._$rootElement.classList.add(this.styleNames.progressControlHidden)},t.prototype.showDownloadButton=function(){this._$rootElement.classList.remove(this.styleNames.downloadButtonHidden)},t.prototype.hidePictureInPictureControl=function(){this._$rootElement.classList.add(this.styleNames.pictureInPictureButtonHidden)},t.prototype.showPictureInPictureControl=function(){this._$rootElement.classList.remove(this.styleNames.pictureInPictureButtonHidden)},t.prototype.hideDownloadButton=function(){this._$rootElement.classList.add(this.styleNames.downloadButtonHidden)},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.showContent=function(){this._$rootElement.classList.add(this.styleNames.activated)},t.prototype.hideContent=function(){this._$rootElement.classList.remove(this.styleNames.activated)},t.prototype.destroy=function(){this._unbindEvents(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null},t}(o.default);c.extendStyleNames(u.default),t.default=c},19382:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},53504:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bottomBlockTemplate=void 0;var i=(0,n(92712).__importDefault)(n(19382)),o=i.default.default?i.default.default:i.default;t.bottomBlockTemplate=o},90981:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(17022)),r=n(24590),s=(0,i.__importStar)(n(43450)),a=(0,i.__importDefault)(n(701)),l=function(){function e(e){var t=e.eventEmitter,n=e.textMap,i=e.tooltipService,o=e.theme;this._eventEmitter=t,this._textMap=n,this._theme=o,this._tooltipService=i,this._bindCallbacks(),this._initUI(),this._initInterceptor()}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._bindCallbacks=function(){this._triggerCallback=this._triggerCallback.bind(this)},e.prototype._initUI=function(){var t={callbacks:{onButtonClick:this._triggerCallback},textMap:this._textMap,tooltipService:this._tooltipService,theme:this._theme};this.view=new e.View(t)},e.prototype._initInterceptor=function(){var e,t=this;this._interceptor=new s.default(this.getElement(),((e={})[s.KEYCODES.SPACE_BAR]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(r.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),t._triggerCallback()},e[s.KEYCODES.ENTER]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(r.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),t._triggerCallback()},e))},e.prototype._destroyInterceptor=function(){this._interceptor.destroy()},e.prototype._triggerCallback=function(){this._callback&&this._callback()},e.prototype.setDownloadClickCallback=function(e){this._callback=e},e.prototype.hide=function(){this.isHidden=!0,this.view.hide()},e.prototype.show=function(){this.isHidden=!1,this.view.show()},e.prototype.destroy=function(){this._destroyInterceptor(),this.view.destroy()},e.moduleName="downloadButton",e.View=a.default,e.dependencies=["eventEmitter","textMap","tooltipService","theme"],(0,i.__decorate)([(0,o.default)()],e.prototype,"setDownloadClickCallback",null),e}();t.default=l},24976:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={downloadSvgFill:{fill:function(e){return e.color}}}},701:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=n(24590),r=(0,i.__importDefault)(n(30313)),s=n(35968),a=(0,i.__importDefault)(n(61045)),l=(0,i.__importDefault)(n(46484)),u=(0,i.__importDefault)(n(24976)),c=(0,i.__importDefault)(n(40059)),d=function(e){function t(t){var n=this,i=t.callbacks,r=t.textMap,u=t.tooltipService,c=t.theme;return(n=e.call(this,c)||this)._callbacks=i,n._textMap=r,n._$rootElement=(0,a.default)((0,s.controlTemplate)({styles:n.styleNames,themeStyles:n.themeStyles,texts:{label:n._textMap.get(o.TextLabel.DOWNLOAD_BUTTON_LABEL)}})),n._$downloadButton=(0,l.default)(n._$rootElement,"download-button"),n._tooltipReference=u.createReference(n._$downloadButton,{text:n._textMap.get(o.TextLabel.DOWNLOAD_BUTTON_TOOLTIP)}),n._bindEvents(),n}return(0,i.__extends)(t,e),t.prototype._bindEvents=function(){this._onButtonClick=this._onButtonClick.bind(this),this._$downloadButton.addEventListener("click",this._onButtonClick)},t.prototype._unbindEvents=function(){this._$downloadButton.removeEventListener("click",this._onButtonClick)},t.prototype._onButtonClick=function(){this._$rootElement.focus(),this._callbacks.onButtonClick()},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._unbindEvents(),this._tooltipReference.destroy(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$downloadButton=null,this._$rootElement=null},t}(r.default);d.setTheme(u.default),d.extendStyleNames(c.default),t.default=d},83068:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},35968:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.controlTemplate=void 0;var i=(0,n(92712).__importDefault)(n(83068)),o=i.default.default?i.default.default:i.default;t.controlTemplate=o},29600:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=n(24590),r=(0,i.__importStar)(n(43450)),s=(0,i.__importDefault)(n(67484)),a=function(){function e(e){var t=e.eventEmitter,n=e.fullScreenManager,i=e.textMap,o=e.tooltipService,r=e.theme;this._eventEmitter=t,this._fullScreenManager=n,this._textMap=i,this._theme=r,this._tooltipService=o,this._bindCallbacks(),this._initUI(),this._bindEvents(),this._fullScreenManager.isEnabled||this.hide(),this._initInterceptor()}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._bindCallbacks=function(){this._toggleFullScreen=this._toggleFullScreen.bind(this)},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[o.UIEvent.FULL_SCREEN_STATE_CHANGED,this.view.setFullScreenState]],this.view)},e.prototype._initUI=function(){var t={callbacks:{onButtonClick:this._toggleFullScreen},textMap:this._textMap,tooltipService:this._tooltipService,theme:this._theme};this.view=new e.View(t)},e.prototype._initInterceptor=function(){var e,t=this;this._interceptor=new r.default(this.getElement(),((e={})[r.KEYCODES.SPACE_BAR]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(o.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED)},e[r.KEYCODES.ENTER]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(o.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED)},e))},e.prototype._destroyInterceptor=function(){this._interceptor.destroy()},e.prototype._toggleFullScreen=function(){this._fullScreenManager.isInFullScreen?(this._fullScreenManager.exitFullScreen(),this._eventEmitter.emitAsync(o.UIEvent.EXIT_FULL_SCREEN_CLICK)):(this._fullScreenManager.enterFullScreen(),this._eventEmitter.emitAsync(o.UIEvent.ENTER_FULL_SCREEN_CLICK))},e.prototype.hide=function(){this.isHidden=!0,this.view.hide()},e.prototype.show=function(){this.isHidden=!1,this.view.show()},e.prototype.destroy=function(){this._destroyInterceptor(),this._unbindEvents(),this.view.destroy()},e.moduleName="fullScreenControl",e.View=s.default,e.dependencies=["eventEmitter","fullScreenManager","textMap","tooltipService","theme"],e}();t.default=a},50221:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={fullScreenSvgFill:{fill:function(e){return e.color}}}},67484:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=n(24590),r=(0,i.__importDefault)(n(30313)),s=n(61608),a=(0,i.__importDefault)(n(61045)),l=(0,i.__importDefault)(n(46484)),u=(0,i.__importDefault)(n(50221)),c=(0,i.__importDefault)(n(30936)),d=function(e){function t(t){var n=this,i=t.callbacks,r=t.textMap,u=t.tooltipService,c=t.theme;return(n=e.call(this,c)||this)._callbacks=i,n._textMap=r,n._$rootElement=(0,a.default)((0,s.controlTemplate)({styles:n.styleNames,themeStyles:n.themeStyles,texts:{label:n._textMap.get(o.TextLabel.ENTER_FULL_SCREEN_LABEL)}})),n._$toggleFullScreenControl=(0,l.default)(n._$rootElement,"full-screen-button"),n._tooltipReference=u.createReference(n._$toggleFullScreenControl,{text:n._textMap.get(o.TextLabel.ENTER_FULL_SCREEN_TOOLTIP)}),n.setFullScreenState(!1),n._bindEvents(),n}return(0,i.__extends)(t,e),t.prototype._bindEvents=function(){this._onButtonClick=this._onButtonClick.bind(this),this._$toggleFullScreenControl.addEventListener("click",this._onButtonClick)},t.prototype._unbindEvents=function(){this._$toggleFullScreenControl.removeEventListener("click",this._onButtonClick)},t.prototype._onButtonClick=function(){this._$toggleFullScreenControl.focus(),this._callbacks.onButtonClick()},t.prototype.setFullScreenState=function(e){e?(this._$toggleFullScreenControl.classList.add(this.styleNames.inFullScreen),this._$toggleFullScreenControl.setAttribute("aria-label",this._textMap.get(o.TextLabel.EXIT_FULL_SCREEN_LABEL)),this._tooltipReference.setText(this._textMap.get(o.TextLabel.EXIT_FULL_SCREEN_TOOLTIP))):(this._$toggleFullScreenControl.classList.remove(this.styleNames.inFullScreen),this._$toggleFullScreenControl.setAttribute("aria-label",this._textMap.get(o.TextLabel.ENTER_FULL_SCREEN_LABEL)),this._tooltipReference.setText(this._textMap.get(o.TextLabel.ENTER_FULL_SCREEN_TOOLTIP)))},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._unbindEvents(),this._tooltipReference.destroy(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$toggleFullScreenControl=null,this._$rootElement=null},t}(r.default);d.setTheme(u.default),d.extendStyleNames(c.default),t.default=d},3690:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},61608:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.controlTemplate=void 0;var i=(0,n(92712).__importDefault)(n(3690)),o=i.default.default?i.default.default:i.default;t.controlTemplate=o},95177:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(17022)),r=(0,i.__importStar)(n(43450)),s=n(24590),a=(0,i.__importDefault)(n(51557)),l=function(){function e(e){var t=e.eventEmitter,n=e.textMap,i=e.tooltipService,o=e.theme;this._eventEmitter=t,this._textMap=n,this._theme=o,this._tooltipService=i,this._bindCallbacks(),this._initUI(),this._initInterceptor()}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._bindCallbacks=function(){this._triggerCallback=this._triggerCallback.bind(this)},e.prototype._initUI=function(){var t={theme:this._theme,callbacks:{onLogoClick:this._triggerCallback},textMap:this._textMap,tooltipService:this._tooltipService};this.view=new e.View(t)},e.prototype._initInterceptor=function(){var e,t=this;this._interceptor=new r.default(this.getElement(),((e={})[r.KEYCODES.SPACE_BAR]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(s.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),t._triggerCallback()},e[r.KEYCODES.ENTER]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(s.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),t._triggerCallback()},e))},e.prototype._destroyInterceptor=function(){this._interceptor.destroy()},e.prototype._triggerCallback=function(){this._callback&&this._callback()},e.prototype.setLogo=function(e){this._logoSrc=e,this.view.setLogo(this._logoSrc),this._setProperDisplayState()},e.prototype.setLogoClickCallback=function(e){this._callback=e,this._setProperDisplayState()},e.prototype._setProperDisplayState=function(){this._callback?this._logoSrc?this.view.showAsInput():this.view.showAsButton():this._logoSrc?this.view.showAsImage():this.view.showAsButton()},e.prototype.hide=function(){this.isHidden=!0,this.view.hide()},e.prototype.show=function(){this.isHidden=!1,this.view.show()},e.prototype.destroy=function(){this._destroyInterceptor(),this.view.destroy()},e.moduleName="logo",e.View=a.default,e.dependencies=["eventEmitter","textMap","tooltipService","theme"],(0,i.__decorate)([(0,o.default)()],e.prototype,"setLogo",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"setLogoClickCallback",null),e}();t.default=l},72506:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={logoButtonSvgFill:{fill:function(e){return e.color}}}},51557:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=n(24590),r=(0,i.__importDefault)(n(30313)),s=n(98147),a=(0,i.__importDefault)(n(61045)),l=(0,i.__importDefault)(n(72506)),u=(0,i.__importDefault)(n(51225)),c=function(e){function t(t){var n=this,i=t.callbacks,r=t.textMap,l=t.tooltipService,u=t.theme;return(n=e.call(this,u)||this)._callbacks=i,n._textMap=r,n._$rootElement=(0,a.default)((0,s.logoTemplate)({styles:n.styleNames,texts:{label:n._textMap.get(o.TextLabel.LOGO_LABEL)}})),n._$logoImage=(0,a.default)((0,s.logoImageTemplate)({styles:n.styleNames,texts:{label:n._textMap.get(o.TextLabel.LOGO_LABEL)}})),n._$logoInput=(0,a.default)((0,s.logoInputTemplate)({styles:n.styleNames,texts:{label:n._textMap.get(o.TextLabel.LOGO_LABEL)}})),n._$logoButton=(0,a.default)((0,s.logoButtonTemplate)({styles:n.styleNames,themeStyles:n.themeStyles,texts:{label:n._textMap.get(o.TextLabel.LOGO_LABEL)}})),n._tooltipReference=l.createReference(n._$rootElement,{text:n._textMap.get(o.TextLabel.LOGO_TOOLTIP)}),n.setLogo(t.logo),n._bindCallbacks(),n._bindEvents(),n.showAsButton(),n}return(0,i.__extends)(t,e),t.prototype.setLogo=function(e){e?(this._$logoImage.setAttribute("src",e),this._$logoInput.setAttribute("src",e)):(this._$logoImage.removeAttribute("src"),this._$logoInput.removeAttribute("src"))},t.prototype.showAsImage=function(){this._setChild(this._$logoImage),this._tooltipReference.disable()},t.prototype.showAsButton=function(){this._setChild(this._$logoButton),this._tooltipReference.enable()},t.prototype.showAsInput=function(){this._setChild(this._$logoInput),this._tooltipReference.enable()},t.prototype._setChild=function(e){this._$rootElement.firstChild&&this._$rootElement.removeChild(this._$rootElement.firstChild),this._$rootElement.appendChild(e)},t.prototype._bindCallbacks=function(){this._onClick=this._onClick.bind(this)},t.prototype._bindEvents=function(){this._$rootElement.addEventListener("click",this._onClick)},t.prototype._unbindEvents=function(){this._$rootElement.removeEventListener("click",this._onClick)},t.prototype._onClick=function(){this._$rootElement.focus(),this._callbacks.onLogoClick()},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.hide=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._unbindEvents(),this._tooltipReference.destroy(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null,this._$logoImage=null,this._$logoInput=null,this._$logoButton=null},t}(r.default);c.setTheme(l.default),c.extendStyleNames(u.default),t.default=c},98147:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logoInputTemplate=t.logoButtonTemplate=t.logoImageTemplate=t.logoTemplate=void 0;var i=n(92712),o=(0,i.__importDefault)(n(54169)),r=(0,i.__importDefault)(n(91598)),s=(0,i.__importDefault)(n(42154)),a=(0,i.__importDefault)(n(75178)),l=o.default.default?o.default.default:o.default;t.logoTemplate=l;var u=r.default.default?r.default.default:r.default;t.logoImageTemplate=u;var c=s.default.default?s.default.default:s.default;t.logoInputTemplate=c;var d=a.default.default?a.default.default:a.default;t.logoButtonTemplate=d},75178:function(e){e.exports={__esModule:!0,default:function(e){return''}}},91598:function(e){e.exports={__esModule:!0,default:function(e){return''}}},42154:function(e){e.exports={__esModule:!0,default:function(e){return''}}},54169:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},50902:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=n(24590),r=(0,i.__importStar)(n(43450)),s=(0,i.__importDefault)(n(78589)),a=function(){function e(e){var t=e.eventEmitter,n=e.pictureInPicture,i=e.textMap,o=e.tooltipService,r=e.theme;this._eventEmitter=t,this._pictureInPictureManager=n,this._textMap=i,this._theme=r,this._tooltipService=o,this._bindCallbacks(),this._initUI(),this._bindEvents(),this._pictureInPictureManager.isEnabled||this.hide(),this._initInterceptor()}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._bindCallbacks=function(){this._togglePictureInPicture=this._togglePictureInPicture.bind(this)},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[o.UIEvent.PICTURE_IN_PICTURE_STATUS_CHANGE,this.view.setPictureInPictureState]],this.view)},e.prototype._initUI=function(){var t={callbacks:{onButtonClick:this._togglePictureInPicture},textMap:this._textMap,tooltipService:this._tooltipService,theme:this._theme};this.view=new e.View(t)},e.prototype._initInterceptor=function(){var e,t=this;this._interceptor=new r.default(this.getElement(),((e={})[r.KEYCODES.SPACE_BAR]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(o.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED)},e[r.KEYCODES.ENTER]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(o.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED)},e))},e.prototype._destroyInterceptor=function(){this._interceptor.destroy()},e.prototype._togglePictureInPicture=function(){this._pictureInPictureManager.isInPictureInPicture?(this._pictureInPictureManager.exitPictureInPicture(),this._eventEmitter.emitAsync(o.UIEvent.EXIT_PICTURE_IN_PICTURE_CLICK)):(this._pictureInPictureManager.enterPictureInPicture(),this._eventEmitter.emitAsync(o.UIEvent.ENTER_PICTURE_IN_PICTURE_CLICK))},e.prototype.hide=function(){this.isHidden=!0,this.view.hide()},e.prototype.show=function(){this.isHidden=!1,this.view.show()},e.prototype.destroy=function(){this._destroyInterceptor(),this._unbindEvents(),this.view.destroy()},e.moduleName="pictureInPictureControl",e.View=s.default,e.dependencies=["eventEmitter","pictureInPicture","textMap","tooltipService","theme"],e}();t.default=a},12403:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={pictureInPictureSvgFill:{fill:function(e){return e.color}}}},78589:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=n(24590),r=(0,i.__importDefault)(n(30313)),s=n(20610),a=(0,i.__importDefault)(n(61045)),l=(0,i.__importDefault)(n(46484)),u=(0,i.__importDefault)(n(12403)),c=(0,i.__importDefault)(n(42836)),d=function(e){function t(t){var n=this,i=t.callbacks,r=t.textMap,u=t.tooltipService,c=t.theme;return(n=e.call(this,c)||this)._callbacks=i,n._textMap=r,n._$rootElement=(0,a.default)((0,s.controlTemplate)({styles:n.styleNames,themeStyles:n.themeStyles,texts:{label:n._textMap.get(o.TextLabel.ENTER_PICTURE_IN_PICTURE_LABEL)}})),n._$togglePictureInPictureControl=(0,l.default)(n._$rootElement,"picture-in-picture-control"),n._tooltipReference=u.createReference(n._$togglePictureInPictureControl,{text:n._textMap.get(o.TextLabel.ENTER_PICTURE_IN_PICTURE_TOOLTIP)}),n.setPictureInPictureState(!1),n._bindEvents(),n}return(0,i.__extends)(t,e),t.prototype._bindEvents=function(){this._onButtonClick=this._onButtonClick.bind(this),this._$togglePictureInPictureControl.addEventListener("click",this._onButtonClick)},t.prototype._unbindEvents=function(){this._$togglePictureInPictureControl.removeEventListener("click",this._onButtonClick)},t.prototype._onButtonClick=function(){this._callbacks.onButtonClick()},t.prototype.setPictureInPictureState=function(e){e?(this._$togglePictureInPictureControl.classList.add(this.styleNames.inPictureInPicture),this._$togglePictureInPictureControl.setAttribute("aria-label",this._textMap.get(o.TextLabel.EXIT_PICTURE_IN_PICTURE_LABEL)),this._tooltipReference.setText(this._textMap.get(o.TextLabel.EXIT_PICTURE_IN_PICTURE_TOOLTIP))):(this._$togglePictureInPictureControl.classList.remove(this.styleNames.inPictureInPicture),this._$togglePictureInPictureControl.setAttribute("aria-label",this._textMap.get(o.TextLabel.ENTER_PICTURE_IN_PICTURE_LABEL)),this._tooltipReference.setText(this._textMap.get(o.TextLabel.ENTER_PICTURE_IN_PICTURE_TOOLTIP)))},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._unbindEvents(),this._tooltipReference.destroy(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$togglePictureInPictureControl=null,this._$rootElement=null},t}(r.default);d.setTheme(u.default),d.extendStyleNames(c.default),t.default=d},9109:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},20610:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.controlTemplate=void 0;var i=(0,n(92712).__importDefault)(n(9109)),o=i.default.default?i.default.default:i.default;t.controlTemplate=o},80997:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(76294)),r=(0,i.__importStar)(n(43450)),s=n(24590),a=function(){function e(e){var t=e.engine,n=e.eventEmitter,i=e.textMap,o=e.theme;this._engine=t,this._eventEmitter=n,this._textMap=i,this._theme=o,this._bindCallbacks(),this._initUI(),this._bindEvents(),this._initInterceptor()}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._initInterceptor=function(){var e,t=this;this._interceptor=new r.default(this.getElement(),((e={})[r.KEYCODES.SPACE_BAR]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(s.UIEvent.TOGGLE_PLAYBACK_WITH_KEYBOARD)},e[r.KEYCODES.ENTER]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(s.UIEvent.TOGGLE_PLAYBACK_WITH_KEYBOARD)},e))},e.prototype._destroyInterceptor=function(){this._interceptor.destroy()},e.prototype._bindCallbacks=function(){this._togglePlayback=this._togglePlayback.bind(this)},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[s.VideoEvent.STATE_CHANGED,this._updatePlayingState]],this)},e.prototype._togglePlayback=function(){this._engine.isPaused?this._playVideo():this._pauseVideo()},e.prototype._playVideo=function(){this._engine.play(),this._eventEmitter.emitAsync(s.UIEvent.PLAY_CLICK)},e.prototype._pauseVideo=function(){this._engine.pause(),this._eventEmitter.emitAsync(s.UIEvent.PAUSE_CLICK)},e.prototype._updatePlayingState=function(){this.view.setPlayingState(!this._engine.isPaused)},e.prototype._initUI=function(){var t={callbacks:{onButtonClick:this._togglePlayback},theme:this._theme,textMap:this._textMap};this.view=new e.View(t)},e.prototype.destroy=function(){this._destroyInterceptor(),this._unbindEvents(),this.view.destroy()},e.moduleName="playControl",e.View=o.default,e.dependencies=["engine","eventEmitter","textMap","theme"],e}();t.default=a},87443:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={playSvgFill:{fill:function(e){return e.color}}}},76294:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=n(24590),r=(0,i.__importDefault)(n(30313)),s=n(98479),a=(0,i.__importDefault)(n(61045)),l=(0,i.__importDefault)(n(46484)),u=(0,i.__importDefault)(n(87443)),c=(0,i.__importDefault)(n(67449)),d=function(e){function t(t){var n=this,i=t.callbacks,r=t.textMap,u=t.theme;return(n=e.call(this,u)||this)._callbacks=i,n._textMap=r,n._$rootElement=(0,a.default)((0,s.controlTemplate)({styles:n.styleNames,themeStyles:n.themeStyles,texts:{label:n._textMap.get(o.TextLabel.PLAY_CONTROL_LABEL)}})),n._$playbackControl=(0,l.default)(n._$rootElement,"playback-control"),n.setPlayingState(!1),n._bindEvents(),n}return(0,i.__extends)(t,e),t.prototype._bindEvents=function(){this._onButtonClick=this._onButtonClick.bind(this),this._$playbackControl.addEventListener("click",this._onButtonClick)},t.prototype._unbindEvents=function(){this._$playbackControl.removeEventListener("click",this._onButtonClick)},t.prototype._onButtonClick=function(){this._$playbackControl.focus(),this._callbacks.onButtonClick()},t.prototype.setPlayingState=function(e){e?(this._$playbackControl.classList.remove(this.styleNames.paused),this._$playbackControl.setAttribute("aria-label",this._textMap.get(o.TextLabel.PAUSE_CONTROL_LABEL))):(this._$playbackControl.classList.add(this.styleNames.paused),this._$playbackControl.setAttribute("aria-label",this._textMap.get(o.TextLabel.PLAY_CONTROL_LABEL))),this._$rootElement.setAttribute("data-playable-is-playing",String(e))},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._unbindEvents(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$playbackControl=null,this._$rootElement=null},t}(r.default);d.setTheme(u.default),d.extendStyleNames(c.default),t.default=d},416:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},98479:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.controlTemplate=void 0;var i=(0,n(92712).__importDefault)(n(416)),o=i.default.default?i.default.default:i.default;t.controlTemplate=o},40796:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PROGRESS_INTERVAL_DELAY=void 0;var i=n(92712),o=(0,i.__importDefault)(n(83664)),r=n(91211),s=n(24590),a=n(66045),l=(0,i.__importStar)(n(43450)),u=(0,i.__importDefault)(n(45264)),c=(0,i.__importDefault)(n(17022));t.UPDATE_PROGRESS_INTERVAL_DELAY=1e3/60;var d=function(){function e(e){var t=e.engine,n=e.liveStateEngine,i=e.eventEmitter,o=e.textMap,r=e.tooltipService,s=e.theme,a=e.previewThumbnail,l=e.previewFullSize;this._engine=t,this._liveStateEngine=n,this._eventEmitter=i,this._textMap=o,this._tooltipService=r,this._previewThumbnail=a,this._previewFullSize=l,this._isUserDragging=!1,this._desiredSeekPosition=0,this._theme=s,this._timeIndicatorsToAdd=[],this._showFullScreenPreview=!1,this._bindCallbacks(),this._initUI(),this._bindEvents(),this.view.setPlayed(0),this.view.setBuffered(0),this._initInterceptor()}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[s.VideoEvent.STATE_CHANGED,this._processStateChange],[s.VideoEvent.LIVE_STATE_CHANGED,this._processLiveStateChange],[s.VideoEvent.CHUNK_LOADED,this._updateBufferIndicator],[s.VideoEvent.DURATION_UPDATED,this._updateAllIndicators],[s.UIEvent.RESIZE,this.view.updateOnResize,this.view]],this)},e.prototype._initUI=function(){var t={callbacks:{onSyncWithLiveClick:this._syncWithLive,onSyncWithLiveMouseEnter:this._onSyncWithLiveMouseEnter,onSyncWithLiveMouseLeave:this._onSyncWithLiveMouseLeave,onChangePlayedPercent:this._onChangePlayedPercent,onSeekToByMouseStart:this._showTooltipAndPreview,onSeekToByMouseEnd:this._hideTooltip,onDragStart:this._startProcessingUserDrag,onDragEnd:this._stopProcessingUserDrag},theme:this._theme,textMap:this._textMap,tooltipService:this._tooltipService};this.view=new e.View(t)},e.prototype._initInterceptor=function(){var e,t=this;this._interceptor=new l.default(this.view.getElement(),((e={})[l.KEYCODES.UP_ARROW]=function(e){e.stopPropagation(),e.preventDefault(),t._eventEmitter.emitAsync(s.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),t._eventEmitter.emitAsync(s.UIEvent.GO_FORWARD_WITH_KEYBOARD),t._engine.seekForward(a.AMOUNT_TO_SKIP_SECONDS)},e[l.KEYCODES.DOWN_ARROW]=function(e){e.stopPropagation(),e.preventDefault(),t._eventEmitter.emitAsync(s.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),t._eventEmitter.emitAsync(s.UIEvent.GO_BACKWARD_WITH_KEYBOARD),t._engine.seekBackward(a.AMOUNT_TO_SKIP_SECONDS)},e[l.KEYCODES.RIGHT_ARROW]=function(e){e.stopPropagation(),e.preventDefault(),t._eventEmitter.emitAsync(s.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),t._eventEmitter.emitAsync(s.UIEvent.GO_FORWARD_WITH_KEYBOARD),t._engine.seekForward(a.AMOUNT_TO_SKIP_SECONDS)},e[l.KEYCODES.LEFT_ARROW]=function(e){e.stopPropagation(),e.preventDefault(),t._eventEmitter.emitAsync(s.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),t._eventEmitter.emitAsync(s.UIEvent.GO_BACKWARD_WITH_KEYBOARD),t._engine.seekBackward(a.AMOUNT_TO_SKIP_SECONDS)},e))},e.prototype._destroyInterceptor=function(){this._interceptor.destroy()},e.prototype._bindCallbacks=function(){this._syncWithLive=this._syncWithLive.bind(this),this._onSyncWithLiveMouseEnter=this._onSyncWithLiveMouseEnter.bind(this),this._onSyncWithLiveMouseLeave=this._onSyncWithLiveMouseLeave.bind(this),this._updateAllIndicators=this._updateAllIndicators.bind(this),this._onChangePlayedPercent=this._onChangePlayedPercent.bind(this),this._showTooltipAndPreview=this._showTooltipAndPreview.bind(this),this._hideTooltip=this._hideTooltip.bind(this),this._startProcessingUserDrag=this._startProcessingUserDrag.bind(this),this._stopProcessingUserDrag=this._stopProcessingUserDrag.bind(this)},e.prototype._startIntervalUpdates=function(){this._updateControlInterval&&this._stopIntervalUpdates(),this._updateAllIndicators(),this._updateControlInterval=window.setInterval(this._updateAllIndicators,t.UPDATE_PROGRESS_INTERVAL_DELAY)},e.prototype._stopIntervalUpdates=function(){window.clearInterval(this._updateControlInterval),this._updateControlInterval=null},e.prototype._convertPlayedPercentToTime=function(e){return this._engine.getDuration()*e/100},e.prototype._onChangePlayedPercent=function(e){var t=this._convertPlayedPercentToTime(e);this._showFullScreenPreview?(this._desiredSeekPosition=t,this._eventEmitter.emitAsync(s.UIEvent.PROGRESS_USER_PREVIEWING_FRAME,t)):this._changeCurrentTimeOfVideo(t),this._isUserDragging&&this._showTooltipAndPreview(e)},e.prototype._showTooltipAndPreview=function(e){var t=this._engine.getDuration(),n=this._convertPlayedPercentToTime(e),i=this._engine.isDynamicContent?n-t:n;this._previewThumbnail.setTime((0,u.default)(i)),this._previewThumbnail.showAt(n),this.view.showProgressTimeTooltip(this._previewThumbnail.getElement(),e),this._isUserDragging&&this._showFullScreenPreview&&this._previewFullSize.showAt(n)},e.prototype._hideTooltip=function(){this._isUserDragging||this.view.hideProgressTimeTooltip()},e.prototype._startProcessingUserDrag=function(){this._isUserDragging||(this._isUserDragging=!0,this._pauseVideoOnDragStart(),this._eventEmitter.emitAsync(s.UIEvent.PROGRESS_DRAG_STARTED),this._eventEmitter.emitAsync(s.UIEvent.CONTROL_DRAG_START))},e.prototype._stopProcessingUserDrag=function(){this._isUserDragging&&(this._isUserDragging=!1,this._showFullScreenPreview&&(this._shouldHidePreviewOnUpdate=!0),this._showFullScreenPreview&&this._changeCurrentTimeOfVideo(this._desiredSeekPosition),this._playVideoOnDragEnd(),this.view.hideProgressTimeTooltip(),this._eventEmitter.emitAsync(s.UIEvent.PROGRESS_DRAG_ENDED),this._eventEmitter.emitAsync(s.UIEvent.CONTROL_DRAG_END))},e.prototype._hidePreview=function(){this._shouldHidePreviewOnUpdate=!1,this._previewFullSize.hide()},e.prototype._processStateChange=function(e){switch(e.nextState){case s.EngineState.SRC_SET:this._reset();break;case s.EngineState.METADATA_LOADED:this._initTimeIndicators(),this._engine.isSeekAvailable?this.show():this.hide();break;case s.EngineState.PLAYING:this._shouldHidePreviewOnUpdate&&this._hidePreview(),this._liveStateEngine.state===s.LiveState.SYNC?this.view.setPlayed(100):this._startIntervalUpdates();break;case s.EngineState.PAUSED:this._shouldHidePreviewOnUpdate&&this._hidePreview(),this._stopIntervalUpdates();break;case s.EngineState.SEEK_IN_PROGRESS:this._updateAllIndicators()}},e.prototype._processLiveStateChange=function(e){switch(e.nextState){case s.LiveState.NONE:this.view.setLiveSyncState(!1),this.view.setUsualMode();break;case s.LiveState.INITIAL:this.view.setLiveMode();break;case s.LiveState.SYNC:this.view.setLiveSyncState(!0);break;case s.LiveState.NOT_SYNC:this.view.setLiveSyncState(!1);break;case s.LiveState.ENDED:this.view.setLiveSyncState(!1),this.view.hideSyncWithLive(),this._engine.getCurrentState()===s.EngineState.PLAYING?this._startIntervalUpdates():this._updateAllIndicators()}},e.prototype._changeCurrentTimeOfVideo=function(e){var t=this._engine.getDuration();this._engine.isDynamicContent&&t===e?this._engine.syncWithLive():this._engine.seekTo(e),this._eventEmitter.emitAsync(s.UIEvent.PROGRESS_CHANGE,e)},e.prototype._pauseVideoOnDragStart=function(){var e=this._engine.getCurrentState();e!==s.EngineState.PLAYING&&e!==s.EngineState.PLAY_REQUESTED||(this._shouldPlayAfterDragEnd=!0,this._engine.pause()),this._eventEmitter.emitAsync(s.UIEvent.PROGRESS_DRAG_STARTED)},e.prototype._playVideoOnDragEnd=function(){this._shouldPlayAfterDragEnd&&(this._engine.play(),this._shouldPlayAfterDragEnd=!1)},e.prototype._updateBufferIndicator=function(){var e=this._engine.getCurrentTime(),t=this._engine.getBuffered(),n=this._engine.getDuration();this._setBuffered((0,r.getOverallBufferedPercent)(t,e,n))},e.prototype._updatePlayedIndicator=function(){if(this._liveStateEngine.state!==s.LiveState.SYNC){var e=this._engine.getCurrentTime(),t=this._engine.getDuration();this._setPlayed((0,r.getOverallPlayedPercent)(e,t))}},e.prototype._updateAllIndicators=function(){this._updatePlayedIndicator(),this._updateBufferIndicator()},e.prototype._initTimeIndicators=function(){var e=this;this._timeIndicatorsToAdd.forEach((function(t){e._addTimeIndicator(t)})),this._timeIndicatorsToAdd=[]},e.prototype._addTimeIndicator=function(e){var t=this._engine.getDuration();e>t||this.view.addTimeIndicator((0,r.getTimePercent)(e,t))},e.prototype._syncWithLive=function(){this._engine.syncWithLive()},e.prototype._onSyncWithLiveMouseEnter=function(){this._eventEmitter.emitAsync(s.UIEvent.PROGRESS_SYNC_BUTTON_MOUSE_ENTER)},e.prototype._onSyncWithLiveMouseLeave=function(){this._eventEmitter.emitAsync(s.UIEvent.PROGRESS_SYNC_BUTTON_MOUSE_LEAVE)},e.prototype._setPlayed=function(e){this.view.setPlayed(e)},e.prototype._setBuffered=function(e){this.view.setBuffered(e)},e.prototype._reset=function(){this._setPlayed(0),this._setBuffered(0),this.clearTimeIndicators()},e.prototype.showPreviewOnProgressDrag=function(){this._showFullScreenPreview=!0},e.prototype.seekOnProgressDrag=function(){this._showFullScreenPreview=!1},e.prototype.addTimeIndicator=function(e){this.addTimeIndicators([e])},e.prototype.addTimeIndicators=function(e){var t,n=this;this._engine.isMetadataLoaded?e.forEach((function(e){n._addTimeIndicator(e)})):(t=this._timeIndicatorsToAdd).push.apply(t,e)},e.prototype.clearTimeIndicators=function(){this.view.clearTimeIndicators()},e.prototype.hide=function(){this.isHidden=!0,this.view.hide()},e.prototype.show=function(){this.isHidden=!1,this.view.show()},e.prototype.destroy=function(){this._destroyInterceptor(),this._stopIntervalUpdates(),this._unbindEvents(),this.view.destroy()},e.moduleName="progressControl",e.View=o.default,e.dependencies=["engine","liveStateEngine","eventEmitter","textMap","tooltipService","theme","previewThumbnail","previewFullSize"],(0,i.__decorate)([(0,c.default)()],e.prototype,"showPreviewOnProgressDrag",null),(0,i.__decorate)([(0,c.default)()],e.prototype,"seekOnProgressDrag",null),(0,i.__decorate)([(0,c.default)()],e.prototype,"addTimeIndicator",null),(0,i.__decorate)([(0,c.default)()],e.prototype,"addTimeIndicators",null),(0,i.__decorate)([(0,c.default)()],e.prototype,"clearTimeIndicators",null),e}();t.default=d},61865:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(52892);t.default={progressPlayed:{backgroundColor:function(e){return e.progressColor}},progressSeekTo:{backgroundColor:function(e){return(0,i.transperentizeColor)(e.progressColor,.5)}},progressSeekBtn:{backgroundColor:function(e){return e.progressColor}}}},83664:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=n(24590),r=(0,i.__importDefault)(n(30313)),s=(0,i.__importDefault)(n(73170)),a=n(72226),l=(0,i.__importDefault)(n(61045)),u=(0,i.__importDefault)(n(46484)),c=(0,i.__importDefault)(n(23802)),d=(0,i.__importDefault)(n(61865)),h=(0,i.__importDefault)(n(85519)),p=function(e,t){var n=t.getBoundingClientRect(),i=e.clientX;return in.left+n.width?100:(e.clientX-n.left)/n.width*100},f=function(e){function t(t){var n=this,i=t.callbacks,o=t.textMap,r=t.tooltipService,s=t.theme;return(n=e.call(this,s)||this)._callbacks=i,n._textMap=o,n._tooltipService=r,n._dragEvents="onpointerdown"in window?{mouseDown:"pointerdown",mouseMove:"pointermove",mouseOut:"pointerout",mouseUp:"pointerup"}:"ontouchstart"in window?{mouseDown:"touchstart",mouseMove:"touchmove",mouseOut:"mouseout",mouseUp:"touchend"}:{mouseDown:"mousedown",mouseMove:"mousemove",mouseOut:"mouseout",mouseUp:"mouseup"},n._initDOM(),n._bindCallbacks(),n._bindEvents(),n._setPlayedDOMAttributes(0),n._setBufferedDOMAttributes(0),n.setUsualMode(),n}return(0,i.__extends)(t,e),t.prototype._initDOM=function(){this._$rootElement=(0,l.default)((0,a.progressTemplate)({styles:this.styleNames,themeStyles:this.themeStyles})),this._$played=(0,u.default)(this._$rootElement,"progress-played"),this._$buffered=(0,u.default)(this._$rootElement,"progress-buffered"),this._$seekTo=(0,u.default)(this._$rootElement,"progress-seek-to"),this._$timeIndicators=(0,u.default)(this._$rootElement,"progress-time-indicators"),this._$seekButton=(0,u.default)(this._$rootElement,"progress-seek-button"),this._$syncButton=(0,u.default)(this._$rootElement,"progress-sync-button"),this._syncButtonTooltipReference=this._tooltipService.createReference(this._$syncButton,{text:this._textMap.get(o.TextLabel.LIVE_SYNC_TOOLTIP)}),this._$hitbox=(0,u.default)(this._$rootElement,"progress-hitbox")},t.prototype._bindCallbacks=function(){this._setPlayedByDrag=this._setPlayedByDrag.bind(this),this._startDragOnMouseDown=this._startDragOnMouseDown.bind(this),this._stopDragOnMouseUp=this._stopDragOnMouseUp.bind(this),this._startSeekToByMouse=this._startSeekToByMouse.bind(this),this._stopSeekToByMouse=this._stopSeekToByMouse.bind(this),this._syncWithLive=this._syncWithLive.bind(this)},t.prototype._bindEvents=function(){this._$seekButton.addEventListener(this._dragEvents.mouseDown,this._startDragOnMouseDown),this._$seekButton.addEventListener(this._dragEvents.mouseMove,this._startSeekToByMouse),this._$seekButton.addEventListener(this._dragEvents.mouseOut,this._stopSeekToByMouse),this._$hitbox.addEventListener(this._dragEvents.mouseDown,this._startDragOnMouseDown),this._$hitbox.addEventListener(this._dragEvents.mouseMove,this._startSeekToByMouse),this._$hitbox.addEventListener(this._dragEvents.mouseOut,this._stopSeekToByMouse),window.addEventListener(this._dragEvents.mouseMove,this._setPlayedByDrag),window.addEventListener(this._dragEvents.mouseUp,this._stopDragOnMouseUp),this._$syncButton.addEventListener("click",this._syncWithLive),this._$syncButton.addEventListener("mouseenter",this._callbacks.onSyncWithLiveMouseEnter),this._$syncButton.addEventListener("mouseleave",this._callbacks.onSyncWithLiveMouseLeave)},t.prototype._unbindEvents=function(){this._$seekButton.removeEventListener(this._dragEvents.mouseDown,this._startDragOnMouseDown),this._$seekButton.removeEventListener(this._dragEvents.mouseMove,this._startSeekToByMouse),this._$seekButton.removeEventListener(this._dragEvents.mouseOut,this._stopSeekToByMouse),this._$hitbox.removeEventListener(this._dragEvents.mouseDown,this._startDragOnMouseDown),this._$hitbox.removeEventListener(this._dragEvents.mouseMove,this._startSeekToByMouse),this._$hitbox.removeEventListener(this._dragEvents.mouseOut,this._stopSeekToByMouse),window.removeEventListener(this._dragEvents.mouseMove,this._setPlayedByDrag),window.removeEventListener(this._dragEvents.mouseUp,this._stopDragOnMouseUp),this._$syncButton.removeEventListener("click",this._syncWithLive),this._$syncButton.removeEventListener("mouseenter",this._callbacks.onSyncWithLiveMouseEnter),this._$syncButton.removeEventListener("mouseleave",this._callbacks.onSyncWithLiveMouseLeave)},t.prototype._startDragOnMouseDown=function(e){if(!(e.button>1)){var t=p(e,this._$hitbox);this._setPlayedDOMAttributes(t),this._callbacks.onChangePlayedPercent(t),this._startDrag()}},t.prototype._stopDragOnMouseUp=function(e){e.button>1||this._stopDrag()},t.prototype._startSeekToByMouse=function(e){var t=p(e,this._$hitbox);this._setSeekToDOMAttributes(t),this._callbacks.onSeekToByMouseStart(t)},t.prototype._stopSeekToByMouse=function(){this._setSeekToDOMAttributes(0),this._callbacks.onSeekToByMouseEnd()},t.prototype._setPlayedByDrag=function(e){if(this._isDragging){var t=p(e,this._$hitbox);this._setPlayedDOMAttributes(t),this._callbacks.onChangePlayedPercent(t)}},t.prototype._startDrag=function(){this._isDragging=!0,this._callbacks.onDragStart(),this._$rootElement.classList.add(this.styleNames.isDragging)},t.prototype._stopDrag=function(){this._isDragging&&(this._isDragging=!1,this._callbacks.onDragEnd(),this._$rootElement.classList.remove(this.styleNames.isDragging))},t.prototype._setSeekToDOMAttributes=function(e){this._$seekTo.setAttribute("style","width:".concat(e,"%;"))},t.prototype._setPlayedDOMAttributes=function(e){this._$rootElement.setAttribute("aria-valuetext",this._textMap.get(o.TextLabel.PROGRESS_CONTROL_VALUE,{percent:e})),this._$rootElement.setAttribute("aria-valuenow",e.toFixed(2)),this._$rootElement.setAttribute("data-playable-played-percent",e.toFixed(2)),this._setPlayedDOMPosition(e)},t.prototype._setPlayedDOMPosition=function(e){var t=e/100,n=this._$rootElement.getBoundingClientRect().width*t;this._$played.style.transform="scaleX(".concat(t.toFixed(3),")"),this._$seekButton.style.transform="translateX(".concat(n.toFixed(3),"px)")},t.prototype._setBufferedDOMAttributes=function(e){this._$buffered.setAttribute("style","width:".concat(e,"%;"))},t.prototype._syncWithLive=function(){this._callbacks.onSyncWithLiveClick()},t.prototype.updateOnResize=function(){this._setPlayedDOMPosition(this._currentPlayedPercent)},t.prototype.showSyncWithLive=function(){this._$syncButton.classList.remove(this.styleNames.hidden)},t.prototype.hideSyncWithLive=function(){this._$syncButton.classList.add(this.styleNames.hidden)},t.prototype.setLiveSyncState=function(e){(0,c.default)(this._$syncButton,this.styleNames.liveSync,e),(0,c.default)(this._$seekButton,this.styleNames.liveSync,e),e?(this._syncButtonTooltipReference.disable(),this._$played.setAttribute("style","width:100%;")):this._syncButtonTooltipReference.enable()},t.prototype.showProgressTimeTooltip=function(e,t){var n=this;this._tooltipService.show({element:e,position:function(e){return(0,s.default)(t,n._$hitbox,e)}})},t.prototype.hideProgressTimeTooltip=function(){this._tooltipService.hide()},t.prototype.setLiveMode=function(){this._$rootElement.classList.add(this.styleNames.inLive),this.showSyncWithLive()},t.prototype.setUsualMode=function(){this._$rootElement.classList.remove(this.styleNames.inLive),this.hideSyncWithLive()},t.prototype.setPlayed=function(e){this._currentPlayedPercent=e,this._setPlayedDOMAttributes(e)},t.prototype.setBuffered=function(e){this._setBufferedDOMAttributes(e)},t.prototype.addTimeIndicator=function(e){this._$timeIndicators.appendChild((0,l.default)((0,a.progressTimeIndicatorTemplate)({percent:e,styles:this.styleNames})))},t.prototype.clearTimeIndicators=function(){this._$timeIndicators.innerHTML=""},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._unbindEvents(),this._syncButtonTooltipReference.destroy(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null,this._$buffered=null,this._$hitbox=null,this._$played=null,this._$seekTo=null,this._$seekButton=null,this._$syncButton=null,this._$timeIndicators=null},t}(r.default);f.setTheme(d.default),f.extendStyleNames(h.default),t.default=f},72226:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.progressTimeIndicatorTemplate=t.progressTemplate=void 0;var i=n(92712),o=(0,i.__importDefault)(n(5102)),r=(0,i.__importDefault)(n(75517)),s=o.default.default?o.default.default:o.default;t.progressTemplate=s;var a=r.default.default?r.default.default:r.default;t.progressTimeIndicatorTemplate=a},5102:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},75517:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},73170:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(33620);t.default=function(e,t,n){return(0,i.getTooltipPositionByReferenceElement)(t,n,(function(t,n){return function(e,t,n){return t+e*n/100}(e,t,n)}))}},35574:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeTemplate=void 0;var i=(0,n(92712).__importDefault)(n(22951)),o=i.default.default?i.default.default:i.default;t.timeTemplate=o},22951:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},41624:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_TIME_INTERVAL_DELAY=void 0;var i=(0,n(92712).__importDefault)(n(7562)),o=n(24590);t.UPDATE_TIME_INTERVAL_DELAY=1e3/60;var r=function(){function e(e){var t=e.eventEmitter,n=e.engine,i=e.theme;this._eventEmitter=t,this._engine=n,this._theme=i,this._bindCallbacks(),this._initUI(),this._bindEvents(),this._setCurrentTime(0),this._setDurationTime(0)}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._bindCallbacks=function(){this._updateCurrentTime=this._updateCurrentTime.bind(this),this._updateDurationTime=this._updateDurationTime.bind(this)},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[o.UIEvent.PROGRESS_USER_PREVIEWING_FRAME,this._updateTimeFromPreview],[o.VideoEvent.STATE_CHANGED,this._toggleIntervalUpdates],[o.VideoEvent.DURATION_UPDATED,this._updateDurationTime],[o.VideoEvent.LIVE_STATE_CHANGED,this._processLiveStateChange]],this)},e.prototype._initUI=function(){var t={theme:this._theme};this.view=new e.View(t)},e.prototype._startIntervalUpdates=function(){this._updateControlInterval&&this._stopIntervalUpdates(),this._updateCurrentTime(),this._updateControlInterval=window.setInterval(this._updateCurrentTime,t.UPDATE_TIME_INTERVAL_DELAY)},e.prototype._stopIntervalUpdates=function(){window.clearInterval(this._updateControlInterval),this._updateControlInterval=null},e.prototype._processLiveStateChange=function(e){switch(e.nextState){case o.LiveState.NONE:this.show();break;case o.LiveState.INITIAL:this.hide();break;case o.LiveState.ENDED:this.show()}},e.prototype._toggleIntervalUpdates=function(e){switch(e.nextState){case o.EngineState.SRC_SET:this.reset();break;case o.EngineState.PLAYING:case o.EngineState.SEEK_IN_PROGRESS:this._startIntervalUpdates();break;default:this._stopIntervalUpdates()}},e.prototype._updateDurationTime=function(){this._setDurationTime(this._engine.getDuration())},e.prototype._updateCurrentTime=function(){var e=this._engine.getCurrentTime();this._setCurrentTime(e)},e.prototype._updateTimeFromPreview=function(e){this.view.setCurrentTime(e)},e.prototype._setDurationTime=function(e){this.view.setDurationTime(e)},e.prototype._setCurrentTime=function(e){this.view.setCurrentTime(e)},e.prototype.hide=function(){this.isHidden=!0,this.view.hide()},e.prototype.show=function(){this.isHidden=!1,this.view.show()},e.prototype.reset=function(){this._setDurationTime(0),this._setCurrentTime(0),this.view.showDuration(),this.view.setCurrentTimeBackward(!1),this.show()},e.prototype.destroy=function(){this._stopIntervalUpdates(),this._unbindEvents(),this.view.destroy()},e.moduleName="timeControl",e.View=i.default,e.dependencies=["engine","eventEmitter","theme"],e}();t.default=r},14501:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={timeText:{color:function(e){return e.color}}}},7562:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(30313)),r=(0,i.__importDefault)(n(45264)),s=n(35574),a=(0,i.__importDefault)(n(61045)),l=(0,i.__importDefault)(n(46484)),u=(0,i.__importDefault)(n(14501)),c=(0,i.__importDefault)(n(48543)),d=function(e){function t(t){var n=this,i=t.theme;return(n=e.call(this,i)||this)._initDOM(),n}return(0,i.__extends)(t,e),t.prototype._initDOM=function(){this._$rootElement=(0,a.default)((0,s.timeTemplate)({styles:this.styleNames,themeStyles:this.themeStyles})),this._$currentTime=(0,l.default)(this._$rootElement,"current-time-indicator"),this._$durationTime=(0,l.default)(this._$rootElement,"duration-time-indicator")},t.prototype.setDurationTime=function(e){e!==this._duration&&(this._duration=e,this._updateDurationTime())},t.prototype.setCurrentTime=function(e){e!==this._current&&(this._current=e,this._updateCurrentTime())},t.prototype.setCurrentTimeBackward=function(e){this._isBackward=e,this._updateCurrentTime()},t.prototype._updateDurationTime=function(){this._$durationTime.innerHTML=(0,r.default)(this._duration),this._$rootElement.setAttribute("data-playable-duration",this._duration?this._duration.toString():"0")},t.prototype._updateCurrentTime=function(){this._isBackward?this._$currentTime.innerHTML=(0,r.default)(this._current-this._duration):this._$currentTime.innerHTML=(0,r.default)(this._current),this._$rootElement.setAttribute("data-playable-current-time",this._current?this._current.toString():"0")},t.prototype.showDuration=function(){this._$durationTime.classList.remove(this.styleNames.hidden)},t.prototype.hideDuration=function(){this._$durationTime.classList.add(this.styleNames.hidden)},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$currentTime=null,this._$durationTime=null,this._$rootElement=null},t}(o.default);d.setTheme(u.default),d.extendStyleNames(c.default),t.default=d},72771:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},71674:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.controlTemplate=void 0;var i=(0,n(92712).__importDefault)(n(72771)),o=i.default.default?i.default.default:i.default;t.controlTemplate=o},59490:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(70869)),r=(0,i.__importStar)(n(43450)),s=n(66045),a=n(24590),l=function(){function e(e){var t=e.engine,n=e.eventEmitter,i=e.textMap,o=e.tooltipService,r=e.theme;this._engine=t,this._eventEmitter=n,this._textMap=i,this._tooltipService=o,this._theme=r,this._bindCallbacks(),this._initUI(),this._bindEvents(),this.view.setVolume(this._engine.getVolume()),this.view.setMute(this._engine.isMuted),this._initInterceptor()}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._initUI=function(){var t={callbacks:{onDragStart:this._broadcastDragStart,onDragEnd:this._broadcastDragEnd,onVolumeLevelChangeFromInput:this._getVolumeLevelFromInput,onVolumeLevelChangeFromWheel:this._getVolumeLevelFromWheel,onToggleMuteClick:this._toggleMuteState},theme:this._theme,textMap:this._textMap,tooltipService:this._tooltipService};this.view=new e.View(t)},e.prototype._initInterceptor=function(){var e,t,n=this;this._buttonInterceptor=new r.default(this.view.getButtonElement(),((e={})[r.KEYCODES.SPACE_BAR]=function(e){e.stopPropagation(),n._eventEmitter.emitAsync(a.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),n._eventEmitter.emitAsync(n._engine.isMuted?a.UIEvent.UNMUTE_WITH_KEYBOARD:a.UIEvent.MUTE_WITH_KEYBOARD)},e[r.KEYCODES.ENTER]=function(e){e.stopPropagation(),n._eventEmitter.emitAsync(a.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),n._eventEmitter.emitAsync(n._engine.isMuted?a.UIEvent.UNMUTE_WITH_KEYBOARD:a.UIEvent.MUTE_WITH_KEYBOARD)},e)),this._inputInterceptor=new r.default(this.view.getInputElement(),((t={})[r.KEYCODES.RIGHT_ARROW]=function(e){e.stopPropagation(),e.preventDefault(),n._eventEmitter.emitAsync(a.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),n._eventEmitter.emitAsync(a.UIEvent.INCREASE_VOLUME_WITH_KEYBOARD),n._engine.setMute(!1),n._engine.increaseVolume(s.AMOUNT_TO_CHANGE_VOLUME)},t[r.KEYCODES.LEFT_ARROW]=function(e){e.stopPropagation(),e.preventDefault(),n._eventEmitter.emitAsync(a.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),n._eventEmitter.emitAsync(a.UIEvent.DECREASE_VOLUME_WITH_KEYBOARD),n._engine.setMute(!1),n._engine.decreaseVolume(s.AMOUNT_TO_CHANGE_VOLUME)},t))},e.prototype._destroyInterceptor=function(){this._buttonInterceptor.destroy(),this._inputInterceptor.destroy()},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[a.VideoEvent.SOUND_STATE_CHANGED,this._updateSoundState]],this)},e.prototype._bindCallbacks=function(){this._getVolumeLevelFromInput=this._getVolumeLevelFromInput.bind(this),this._toggleMuteState=this._toggleMuteState.bind(this),this._getVolumeLevelFromWheel=this._getVolumeLevelFromWheel.bind(this),this._broadcastDragStart=this._broadcastDragStart.bind(this),this._broadcastDragEnd=this._broadcastDragEnd.bind(this)},e.prototype._broadcastDragStart=function(){this._eventEmitter.emitAsync(a.UIEvent.CONTROL_DRAG_START)},e.prototype._broadcastDragEnd=function(){this._eventEmitter.emitAsync(a.UIEvent.CONTROL_DRAG_END)},e.prototype._changeVolumeLevel=function(e){this._engine.setVolume(e),this._eventEmitter.emitAsync(a.UIEvent.VOLUME_CHANGE,e),this._engine.isMuted&&this._toggleMuteState()},e.prototype._toggleMuteState=function(){var e=!this._engine.isMuted;this._engine.setMute(e),this._eventEmitter.emitAsync(e?a.UIEvent.MUTE_CLICK:a.UIEvent.UNMUTE_CLICK)},e.prototype._getVolumeLevelFromWheel=function(e){if(!this._engine.isMuted){var t=this._engine.getVolume()+e/10,n=Math.min(100,Math.max(0,t));this._changeVolumeLevel(n)}},e.prototype._getVolumeLevelFromInput=function(e){this._changeVolumeLevel(e)},e.prototype._updateSoundState=function(){this._setVolumeLevel(this._engine.getVolume()),this._setMuteState(this._engine.isMuted)},e.prototype._setVolumeLevel=function(e){this.view.setVolume(e),this.view.setMute(Boolean(!e))},e.prototype._setMuteState=function(e){var t=this._engine.getVolume();this.view.setVolume(e?0:t),this.view.setMute(e||Boolean(!t))},e.prototype.hide=function(){this.isHidden=!0,this.view.hide()},e.prototype.show=function(){this.isHidden=!1,this.view.show()},e.prototype.destroy=function(){this._destroyInterceptor(),this._unbindEvents(),this.view.destroy()},e.moduleName="volumeControl",e.View=o.default,e.dependencies=["engine","eventEmitter","textMap","tooltipService","theme"],e}();t.default=l},39110:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(52892);t.default={volumeSvgFill:{fill:function(e){return e.color}},volumeSvgStroke:{stroke:function(e){return e.color}},volumeProgress:{backgroundColor:function(e){return e.color},"&:after":{backgroundColor:function(e){return e.color}}},volumeProgressBackground:{backgroundColor:function(e){return(0,i.transperentizeColor)(e.color,.25)}}}},70869:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=n(24590),r=n(71674),s=(0,i.__importDefault)(n(30313)),a=(0,i.__importDefault)(n(61045)),l=(0,i.__importDefault)(n(46484)),u=(0,i.__importDefault)(n(39110)),c=(0,i.__importDefault)(n(83323)),d=function(e,t){var n=t.getBoundingClientRect(),i=e.clientX;return in.left+n.width?100:(e.clientX-n.left)/n.width*100},h=function(e){function t(t){var n=this,i=t.callbacks,o=t.textMap,r=t.tooltipService,s=t.theme;return(n=e.call(this,s)||this)._callbacks=i,n._textMap=o,n._tooltipService=r,n._bindCallbacks(),n._initDOM(),n._bindEvents(),n}return(0,i.__extends)(t,e),t.prototype._initDOM=function(){this._$rootElement=(0,a.default)((0,r.controlTemplate)({styles:this.styleNames,themeStyles:this.themeStyles,texts:{muteLabel:this._textMap.get(o.TextLabel.MUTE_CONTROL_LABEL),volumeLabel:this._textMap.get(o.TextLabel.VOLUME_CONTROL_LABEL)}})),this._$muteToggle=(0,l.default)(this._$rootElement,"mute-button"),this._$volumeContainer=(0,l.default)(this._$rootElement,"volume-input-block"),this._$hitbox=(0,l.default)(this._$rootElement,"volume-hitbox"),this._$volume=(0,l.default)(this._$rootElement,"volume-input"),this._muteToggleTooltipReference=this._tooltipService.createReference(this._$muteToggle,{text:this._textMap.get(o.TextLabel.MUTE_CONTROL_TOOLTIP)})},t.prototype._bindCallbacks=function(){this._onButtonClick=this._onButtonClick.bind(this),this._startDragOnMouseDown=this._startDragOnMouseDown.bind(this),this._stopDragOnMouseUp=this._stopDragOnMouseUp.bind(this),this._setVolumeByWheel=this._setVolumeByWheel.bind(this),this._setVolumeByClick=this._setVolumeByClick.bind(this),this._setVolumeByDrag=this._setVolumeByDrag.bind(this)},t.prototype._bindEvents=function(){this._$hitbox.addEventListener("wheel",this._setVolumeByWheel),this._$hitbox.addEventListener("mousedown",this._startDragOnMouseDown),window.addEventListener("mousemove",this._setVolumeByDrag),window.addEventListener("mouseup",this._stopDragOnMouseUp),this._$muteToggle.addEventListener("click",this._onButtonClick)},t.prototype._unbindEvents=function(){this._$hitbox.removeEventListener("wheel",this._setVolumeByWheel),this._$hitbox.removeEventListener("mousedown",this._startDragOnMouseDown),window.removeEventListener("mousemove",this._setVolumeByDrag),window.removeEventListener("mouseup",this._stopDragOnMouseUp),this._$muteToggle.removeEventListener("click",this._onButtonClick)},t.prototype._startDragOnMouseDown=function(e){e.button>1||(this._setVolumeByClick(e),this._startDrag())},t.prototype._stopDragOnMouseUp=function(e){e.button>1||this._stopDrag()},t.prototype._setVolumeByClick=function(e){this._$volumeContainer.focus();var t=d(e,this._$hitbox);this._callbacks.onVolumeLevelChangeFromInput(t)},t.prototype._setVolumeByDrag=function(e){var t=d(e,this._$hitbox);this._isDragging&&this._callbacks.onVolumeLevelChangeFromInput(t)},t.prototype._setVolumeByWheel=function(e){e.preventDefault();var t=e.deltaX||-1*e.deltaY;t&&this._callbacks.onVolumeLevelChangeFromWheel(t)},t.prototype._startDrag=function(){this._isDragging=!0,this._$rootElement.classList.add(this.styleNames.isDragging),this._callbacks.onDragStart()},t.prototype._stopDrag=function(){this._isDragging&&(this._isDragging=!1,this._$rootElement.classList.remove(this.styleNames.isDragging),this._callbacks.onDragEnd())},t.prototype._setVolumeDOMAttributes=function(e){this._$volumeContainer.setAttribute("value",String(e)),this._$volumeContainer.setAttribute("aria-valuetext",this._textMap.get(o.TextLabel.VOLUME_CONTROL_VALUE,{percent:e})),this._$volumeContainer.setAttribute("aria-valuenow",String(e)),this._$volume.setAttribute("style","width:".concat(e,"%;")),this._$rootElement.setAttribute("data-playable-volume-percent",String(e)),this._$muteToggle.classList.remove(this.styleNames.volume0),this._$muteToggle.classList.remove(this.styleNames.volume50),this._$muteToggle.classList.remove(this.styleNames.volume100),e>=50?this._$muteToggle.classList.add(this.styleNames.volume100):e>0?this._$muteToggle.classList.add(this.styleNames.volume50):this._$muteToggle.classList.add(this.styleNames.volume0)},t.prototype._onButtonClick=function(){this._$muteToggle.focus(),this._callbacks.onToggleMuteClick()},t.prototype.setVolume=function(e){this._setVolumeDOMAttributes(e)},t.prototype.setMute=function(e){this._setMuteDOMAttributes(e)},t.prototype._setMuteDOMAttributes=function(e){e?this._$muteToggle.classList.add(this.styleNames.muted):this._$muteToggle.classList.remove(this.styleNames.muted),this._$muteToggle.setAttribute("aria-label",e?this._textMap.get(o.TextLabel.UNMUTE_CONTROL_LABEL):this._textMap.get(o.TextLabel.MUTE_CONTROL_LABEL)),this._muteToggleTooltipReference.setText(e?this._textMap.get(o.TextLabel.UNMUTE_CONTROL_TOOLTIP):this._textMap.get(o.TextLabel.MUTE_CONTROL_TOOLTIP)),this._$rootElement.setAttribute("data-playable-is-muted",String(e))},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.getButtonElement=function(){return this._$muteToggle},t.prototype.getInputElement=function(){return this._$volumeContainer},t.prototype.destroy=function(){this._unbindEvents(),this._muteToggleTooltipReference.destroy(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$muteToggle=null,this._$rootElement=null},t}(s.default);h.setTheme(u.default),h.extendStyleNames(c.default),t.default=h},40009:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=(0,n(92712).__importDefault)(n(19768)),o=function(){function e(e,t){var n=(void 0===t?{}:t).prefix,i=void 0===n?"data-playable":n;this._element=e,this._queryPrefix=i,this._queries=[]}return e.prototype._getQueryAttributeValue=function(e,t){return this._queries.filter((function(n){return n.mode===e&&("max"===e&&n.width>=t||"min"===e&&n.width<=t)})).map((function(e){return"".concat(e.width,"px")})).join(" ")},e.prototype._setQueryAttribute=function(e,t){var n=this._queryPrefix?"".concat(this._queryPrefix,"-").concat(e,"-width"):"".concat(e,"-width"),i=this._getQueryAttributeValue(e,t);i?this._element.setAttribute(n,i):this._element.removeAttribute(n)},e.prototype.getQueries=function(){this._queries=(0,i.default)(this._element,this._queryPrefix)},e.prototype.setWidth=function(e){this._setQueryAttribute("min",e),this._setQueryAttribute("max",e)},e.prototype.destroy=function(){this._element=null},e}();t.default=o},19768:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=n(46720),r=(0,i.__importDefault)(n(12301)),s=/,?[\s\t]*([^,\n]*?)((?:\[[\s\t]*?(?:[a-z-]+-)?(?:min|max)-width[\s\t]*?[~$\^]?=[\s\t]*?"[^"]*?"[\s\t]*?])+)([^,\n\s\{]*)/gim,a=/\[[\s\t]*?(?:([a-z-]+)-)?(min|max)-width[\s\t]*?[~$\^]?=[\s\t]*?"([^"]*?)"[\s\t]*?]/gim;function l(e){var t=[];return-1===e.indexOf("min-width")&&-1===e.indexOf("max-width")?[]:(e=e.replace(/'/g,'"'),(0,o.forEachMatch)(e,s,(function(e){var n=e.slice(1),i=n[0],r=n[1],s=i+n[2];(0,o.forEachMatch)(r,a,(function(e){var n=e.slice(1),i=n[0],o=void 0===i?"":i,r=n[1],a=n[2];t.push({selector:s,prefix:o,mode:r,width:parseInt(a,10)})}))})),t)}function u(){return(0,o.reduce)(document.styleSheets,(function(e,t){try{var n=t.cssRules||t.rules;if(n)return e.concat(function(e){return(0,o.reduce)(e,(function(e,t){if(1===t.type){var n=t.selectorText||t.cssText;return e.concat(l(n))}return e}),[])}(n));if(t.cssText)return e.concat(l(t.cssText))}catch(e){}return e}),[])}t.default=function(e,t){void 0===t&&(t="");var n=new Map,i=[];return u().forEach((function(o){n.has(o.selector)||n.set(o.selector,(0,r.default)(e,o.selector)),n.get(o.selector)&&(o.prefix!==t||i.some((function(e){return e.mode===o.mode&&e.width===o.width}))||i.push({mode:o.mode,width:o.width}))})),i.sort((function(e,t){return e.width-t.width}))}},96085:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(40009);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i(o).default}})},12301:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector"];if("undefined"!=typeof HTMLElement)for(var o=0;o1)throw new Error("HTML provided to htmlToElement doesn't have root element");return t.firstChild}},8866:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=(0,n(92712).__importDefault)(n(9383)),o=function(){function e(e){this._themeStyles={};var t=this.constructor._moduleTheme;e&&t&&(e.registerModuleTheme(this,t),this._themeStyles=e.get(this))}return e.setTheme=function(e){this._moduleTheme=e},e.extendStyleNames=function(e){this._styles=(0,i.default)(this._styles,e)},e.resetStyles=function(){this._styles={}},Object.defineProperty(e.prototype,"themeStyles",{get:function(){return this._themeStyles},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"styleNames",{get:function(){return this.constructor._styles||{}},enumerable:!1,configurable:!0}),e._styles={},e}();t.default=o},52892:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_THEME_CONFIG=t.transperentizeColor=void 0;var i=n(92712),o=(0,i.__importDefault)(n(50622));t.transperentizeColor=o.default;var r=(0,i.__importStar)(n(87411));Object.defineProperty(t,"DEFAULT_THEME_CONFIG",{enumerable:!0,get:function(){return r.DEFAULT_THEME_CONFIG}}),t.default=r.default},1725:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StyleSheet=void 0;var i=n(92712),o=(0,i.__importDefault)(n(20054)),r=(0,i.__importDefault)(n(7105)),s=function(){function e(){this._rulesByModule=new Map,this._classNamesByModule=new Map,this._data={}}return e.prototype.attach=function(){var e=this;this._styleNode=this._styleNode||document.createElement("style");var t=[];this._rulesByModule.forEach((function(n,i){t.push(e._getModuleCSS(i))})),this._styleNode.innerHTML=t.join(" "),document.getElementsByTagName("head")[0].appendChild(this._styleNode)},e.prototype.update=function(e){this._data=(0,i.__assign)((0,i.__assign)({},this._data),e),this._styleNode&&this.attach()},e.prototype.registerModuleTheme=function(e,t){if(this._rulesByModule.get(e))throw new Error("can`t register multiple themes for one module");this._rulesByModule.set(e,t),this._classNamesByModule.set(e,(0,r.default)(t))},e.prototype.getModuleClassNames=function(e){return this._classNamesByModule.get(e)},e.prototype._getModuleCSS=function(e){var t=this,n=this._rulesByModule.get(e),i=this._classNamesByModule.get(e);return n&&i?Object.keys(n).map((function(e){return t._getRuleCSS(n[e],i[e])})).join(" "):""},e.prototype._getRuleCSS=function(e,t){var n=this;if(!e||!t)return"";var i=Object.keys(e).filter((function(t){return"object"==typeof e[t]})).map((function(e){return-1!==e.indexOf("&")?e:"& ".concat(e)})).map((function(i){var o=i.replace(/&/g,".".concat(t));return"".concat(o," {").concat(n._getRuleStyles(e[i]),"}")})).join(" ");return".".concat(t," {").concat(this._getRuleStyles(e),"} ").concat(i)},e.prototype._getRuleStyles=function(e){var t=this;return Object.keys(e).filter((function(t){return"object"!=typeof e[t]})).map((function(n){return"".concat((0,o.default)(n),": ").concat("function"==typeof e[n]?e[n](t._data):e[n])})).join("; ")},e}();t.StyleSheet=s},87411:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_THEME_CONFIG=void 0;var i=n(92712),o=n(1725),r=(0,i.__importDefault)(n(17022)),s={color:"#FFF",liveColor:"#ea492e",progressColor:"#FFF"};t.DEFAULT_THEME_CONFIG=s;var a=function(){function e(e){var t=this,n=e.themeConfig;this._styleSheet=new o.StyleSheet,this._styleSheet.update((0,i.__assign)((0,i.__assign)({},s),n)),window.setTimeout((function(){t._styleSheet&&t._styleSheet.attach()}),0)}return e.prototype.updateTheme=function(e){this._styleSheet.update(e)},e.prototype.registerModuleTheme=function(e,t){this._styleSheet.registerModuleTheme(e,t)},e.prototype.get=function(e){return this._styleSheet.getModuleClassNames(e)},e.prototype.destroy=function(){this._styleSheet=null},e.moduleName="theme",e.dependencies=["themeConfig"],(0,i.__decorate)([(0,r.default)()],e.prototype,"updateTheme",null),e}();t.default=a},20054:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}},7105:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(68238));t.default=function(e){return Object.keys(e).reduce((function(e,t){var n;return(0,i.__assign)((0,i.__assign)({},e),((n={})[t]=function(e){return"wix-playable--".concat((0,o.default)(e))}(t),n))}),{})}},68238:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=(0,n(92712).__importDefault)(n(20054)),o=new Map;t.default=function(e){var t=(0,i.default)(e);return"".concat(t).concat(function(e){if(o.has(e)){var t=o.get(e)+1;return o.set(e,t),"".concat(t)}return o.set(e,0),""}(t))}},93590:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;t.default=function(e){var t=(e=e.replace(n,(function(e,t,n,i){return t+t+n+n+i+i}))).match(i);if(t)return{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)};throw new Error("Playable.js: Color passed to theme should be in HEX format")}},50622:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=(0,n(92712).__importDefault)(n(93590));t.default=function(e,t){void 0===t&&(t=1);var n=(0,i.default)(e),o=n.r,r=n.g,s=n.b;return"rgba(".concat(o,",").concat(r,",").concat(s,",").concat(t,")")}},23802:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){n?e.classList.add(t):e.classList.remove(t)}},33620:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getTooltipPositionByReferenceElement=t.TooltipService=t.Tooltip=void 0;var o=n(18632);Object.defineProperty(t,"Tooltip",{enumerable:!0,get:function(){return i(o).default}});var r=n(7179);Object.defineProperty(t,"TooltipService",{enumerable:!0,get:function(){return i(r).default}});var s=n(85600);Object.defineProperty(t,"getTooltipPositionByReferenceElement",{enumerable:!0,get:function(){return i(s).default}})},41548:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tooltipContainerTemplate=t.tooltipTemplate=void 0;var i=n(92712),o=(0,i.__importDefault)(n(414)),r=(0,i.__importDefault)(n(22403)),s=o.default.default?o.default.default:o.default;t.tooltipTemplate=s;var a=r.default.default?r.default.default:r.default;t.tooltipContainerTemplate=a},414:function(e){e.exports={__esModule:!0,default:function(e){return''}}},22403:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},94307:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=n(41548),r=(0,i.__importDefault)(n(61045)),s=(0,i.__importDefault)(n(8866)),a=n(77856),l=(0,i.__importDefault)(n(54626)),u=function(e){function t(t){var n=e.call(this)||this;return n._tooltip=t,n._initDOM(),n}return(0,i.__extends)(t,e),t.prototype.getElement=function(){return this._$rootElement},t.prototype._initDOM=function(){this._$rootElement=(0,r.default)((0,o.tooltipContainerTemplate)({styles:this.styleNames})),this._$rootElement.appendChild(this._tooltip.getElement())},t.prototype.getTooltipPositionStyles=function(e){return"function"==typeof e&&(e=e(this._$rootElement)),e.placement===a.TooltipPositionPlacement.TOP?{left:"".concat(this._getTooltipLeftX(e.x),"px"),top:0,bottom:"initial"}:{left:"".concat(this._getTooltipLeftX(e.x),"px"),top:"initial",bottom:0}},t.prototype.destroy=function(){this._tooltip=null,this._$rootElement=null},t.prototype._getTooltipLeftX=function(e){var t=this._tooltip.getElement().getBoundingClientRect(),n=this._$rootElement.getBoundingClientRect(),i=e-t.width/2;return i=Math.max(i,0),i=Math.min(i,n.width-t.width)},t}(s.default);u.extendStyleNames(l.default),t.default=u},21271:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=(0,n(92712).__importDefault)(n(85600)),o=["mouseenter","focus"],r=["mouseleave","blur"],s=function(){function e(e,t,n){this._$reference=e,this._options=n,this._tooltipService=t,this._eventListeners=[],this._bindEvents()}return e.prototype._bindEvents=function(){var e=this;o.forEach((function(t){var n=function(){e.show()};e._eventListeners.push({event:t,fn:n}),e._$reference.addEventListener(t,n)})),r.forEach((function(t){var n=function(){e.hide()};e._eventListeners.push({event:t,fn:n}),e._$reference.addEventListener(t,n)}))},Object.defineProperty(e.prototype,"isHidden",{get:function(){return this._tooltipService.isHidden},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDisabled",{get:function(){return this._isDisabled},enumerable:!1,configurable:!0}),e.prototype.show=function(){this._isDisabled||this._tooltipService.show({text:this._options.text,element:this._options.element,position:(0,i.default)(this._$reference,this._tooltipService.tooltipContainerElement)})},e.prototype.hide=function(){this._tooltipService.hide()},e.prototype.setText=function(e){this._options.text=e,this._tooltipService.setText(e)},e.prototype.disable=function(){this._isDisabled=!0},e.prototype.enable=function(){this._isDisabled=!1},e.prototype.destroy=function(){var e=this;this._eventListeners.forEach((function(t){var n=t.event,i=t.fn;e._$reference.removeEventListener(n,i)})),this._eventListeners=null,this._$reference=null,this._tooltipService=null,this._options=null},e}();t.default=s},7179:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(21271)),r=(0,i.__importDefault)(n(94307)),s=(0,i.__importDefault)(n(18632)),a=n(24590),l=function(){function e(e){var t=e.eventEmitter;this._eventEmitter=t,this._tooltip=new s.default,this._tooltipContainer=new r.default(this._tooltip),this._bindEvents()}return Object.defineProperty(e.prototype,"isHidden",{get:function(){return this._tooltip.isHidden},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tooltipContainerElement",{get:function(){return this._tooltipContainer.getElement()},enumerable:!1,configurable:!0}),e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[a.UIEvent.FULL_SCREEN_STATE_CHANGED,this.hide]],this)},e.prototype.setText=function(e){this._tooltip.setText(e)},e.prototype.show=function(e){e.element?this._tooltip.setElement(e.element):this._tooltip.setText(e.text),this._tooltip.setStyle(this._tooltipContainer.getTooltipPositionStyles(e.position)),this._tooltip.show()},e.prototype.clearElement=function(){this._tooltip.clearElement()},e.prototype.hide=function(){this._tooltip.hide()},e.prototype.createReference=function(e,t){return new o.default(e,this,t)},e.prototype.destroy=function(){this._unbindEvents(),this._tooltip.destroy(),this._tooltipContainer.destroy(),this._tooltip=null,this._tooltipContainer=null,this._eventEmitter=null},e.moduleName="tooltipService",e.dependencies=["eventEmitter"],e}();t.default=l},18632:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=n(41548),r=(0,i.__importDefault)(n(61045)),s=(0,i.__importDefault)(n(46484)),a=(0,i.__importDefault)(n(8866)),l=(0,i.__importDefault)(n(89329)),u=function(e){function t(){var t=e.call(this)||this;return t._isHidden=!0,t._initDOM(),t}return(0,i.__extends)(t,e),t.prototype._initDOM=function(){this._$rootElement=(0,r.default)((0,o.tooltipTemplate)({styles:this.styleNames})),this._$tooltipInner=(0,s.default)(this._$rootElement,"tooltip-inner")},t.prototype.getElement=function(){return this._$rootElement},Object.defineProperty(t.prototype,"isHidden",{get:function(){return this._isHidden},enumerable:!1,configurable:!0}),t.prototype.show=function(){this._isHidden&&(this._isHidden=!1,this._$rootElement.classList.add(this.styleNames.tooltipVisible))},t.prototype.hide=function(){this._isHidden||(this._isHidden=!0,this._$rootElement.classList.remove(this.styleNames.tooltipVisible))},t.prototype.setText=function(e){this.clearElement(),this._showAsText(),this._$tooltipInner.innerText=e},t.prototype.clearElement=function(){this._$tooltipInner.firstChild&&this._$tooltipInner.removeChild(this._$tooltipInner.firstChild)},t.prototype.setElement=function(e){e!==this._$tooltipInner.firstChild&&(this._showAsElement(),this.clearElement(),e&&this._$tooltipInner.appendChild(e))},t.prototype._showAsText=function(){this._$rootElement.classList.remove(this.styleNames.showAsElement),this._$rootElement.classList.add(this.styleNames.showAsText)},t.prototype._showAsElement=function(){this._$rootElement.classList.remove(this.styleNames.showAsText),this._$rootElement.classList.add(this.styleNames.showAsElement)},t.prototype.setStyle=function(e){var t=this;Object.keys(e).forEach((function(n){t._$rootElement.style[n]=e[n]}))},t.prototype.destroy=function(){this._$rootElement=null,this._$tooltipInner=null},t}(a.default);u.extendStyleNames(l.default),t.default=u},77856:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TooltipPositionPlacement=void 0,function(e){e.TOP="top",e.BOTTOM="bottom"}(n||(n={})),t.TooltipPositionPlacement=n},85600:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(77856);function o(e,t){return e+t/2}t.default=function(e,t,n){void 0===n&&(n=o);var r=e.getBoundingClientRect(),s=t.getBoundingClientRect();return{placement:r.top>s.top?i.TooltipPositionPlacement.BOTTOM:i.TooltipPositionPlacement.TOP,x:n(r.left-s.left,r.width)}}},45264:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=!isNaN(e)&&isFinite(e),n=t&&e<0,i=new Date(null);i.setSeconds(t?Math.abs(Math.floor(e)):0);var o=i.toISOString().substr(11,8).replace(/^00:/,"");return n?"-".concat(o):o}},30313:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.__extends)(t,e),t}((0,i.__importDefault)(n(8866)).default);t.default=o},88858:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=n(24590),r=(0,i.__importDefault)(n(58263)),s=n(43450),a=function(){function e(e){var t=e.engine,n=e.rootContainer,i=e.keyboardControl;this._engine=t,this._bindCallbacks(),this._initUI(),this.hide(),n.appendComponentElement(this.getElement()),i.addKeyControl(s.KEYCODES.DEBUG_KEY,this._keyControlCallback)}return e.prototype._keyControlCallback=function(e){e.ctrlKey&&e.shiftKey&&this.show()},e.prototype.getElement=function(){return this.view.getElement()},e.prototype._initUI=function(){this.view=new r.default({callbacks:{onCloseButtonClick:this.hide}})},e.prototype._bindCallbacks=function(){this.updateInfo=this.updateInfo.bind(this),this.hide=this.hide.bind(this),this._keyControlCallback=this._keyControlCallback.bind(this)},e.prototype.getDebugInfo=function(){var e=this._engine.getDebugInfo();if("html5video"===e.output){var t=e,n=t.url,i=t.type,r=t.deliveryPriority,s=t.currentBitrate,a=t.overallBufferLength,l=t.nearestBufferSegInfo,u=t.viewDimensions,c=t.currentTime,d=t.duration,h=t.loadingStateTimestamps,p=t.bitrates,f=t.bwEstimate,_=t.output;return{url:n,type:i,deliveryPriority:o.MediaStreamDeliveryPriority[r],currentBitrate:s,overallBufferLength:a,nearestBufferSegInfo:l,viewDimensions:u,currentTime:c,duration:d,loadingStateTimestamps:h,bitrates:p,bwEstimate:f,output:_}}return e},e.prototype.updateInfo=function(){this.view.setInfo(this.getDebugInfo())},e.prototype.setUpdateInterval=function(){this.clearUpdateInterval(),this._interval=window.setInterval(this.updateInfo,1e3)},e.prototype.clearUpdateInterval=function(){window.clearInterval(this._interval)},e.prototype.show=function(){this.isHidden&&(this.updateInfo(),this.setUpdateInterval(),this.view.show(),this.isHidden=!1)},e.prototype.hide=function(){this.isHidden||(this.clearUpdateInterval(),this.view.hide(),this.isHidden=!0)},e.prototype.destroy=function(){this.clearUpdateInterval(),this.view.destroy()},e.moduleName="debugPanel",e.View=r.default,e.dependencies=["engine","rootContainer","keyboardControl"],e}();t.default=a},58263:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(30313)),r=n(20785),s=(0,i.__importDefault)(n(25979)),a=(0,i.__importDefault)(n(61045)),l=(0,i.__importDefault)(n(46484)),u=(0,i.__importDefault)(n(23802)),c=(0,i.__importDefault)(n(83909)),d=function(e){function t(t){var n=e.call(this)||this,i=t.callbacks;return n._callbacks=i,n._initDOM(),n._bindEvents(),n}return(0,i.__extends)(t,e),t.prototype._initDOM=function(){this._$rootElement=(0,a.default)((0,r.debugPanelTemplate)({styles:this.styleNames})),this._$closeButton=(0,l.default)(this._$rootElement,"debug-panel-close-button"),this._$infoContainer=(0,l.default)(this._$rootElement,"debug-panel-info-container")},t.prototype._bindEvents=function(){this._$closeButton.addEventListener("click",this._callbacks.onCloseButtonClick)},t.prototype._unbindEvents=function(){this._$closeButton.removeEventListener("click",this._callbacks.onCloseButtonClick)},t.prototype.show=function(){(0,u.default)(this._$rootElement,this.styleNames.hidden,!1)},t.prototype.hide=function(){(0,u.default)(this._$rootElement,this.styleNames.hidden,!0)},t.prototype.setInfo=function(e){this._$infoContainer.innerHTML=(0,s.default)(JSON.stringify(e,void 0,4),this.styleNames)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._unbindEvents(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null,this._$closeButton=null,this._$infoContainer=null},t}(o.default);d.extendStyleNames(c.default),t.default=d},25979:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(e=e.replace(/&/g,"&").replace(//g,">")).replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)/g,(function(e){var n=t.number;return/^"/.test(e)?n=/:$/.test(e)?t.key:t.string:/true|false/.test(e)?n=t.boolean:/null/.test(e)&&(n=t.null),'').concat(e,"")}))}},23691:function(e){e.exports={__esModule:!0,default:function(e){return'
x
 
'}}},20785:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debugPanelTemplate=void 0;var i=(0,n(92712).__importDefault)(n(23691)),o=i.default.default?i.default.default:i.default;t.debugPanelTemplate=o},90859:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=n(24590),r=(0,i.__importDefault)(n(86915)),s=function(){function e(e){var t=e.eventEmitter,n=e.engine,i=e.config,o=e.rootContainer;this._eventEmitter=t,this._engine=n,this._initUI(),this._bindEvents(),o.appendComponentElement(this.getElement()),i.hideMainUI&&this.hide()}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._initUI=function(){this.view=new r.default},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[o.UIEvent.TOGGLE_PLAYBACK_WITH_KEYBOARD,this._showPlaybackChangeIndicator],[o.UIEvent.GO_BACKWARD_WITH_KEYBOARD,this.showRewind],[o.UIEvent.GO_FORWARD_WITH_KEYBOARD,this.showForward],[o.UIEvent.INCREASE_VOLUME_WITH_KEYBOARD,this.showIncreaseVolume],[o.UIEvent.DECREASE_VOLUME_WITH_KEYBOARD,this.showDecreaseVolume],[o.UIEvent.MUTE_WITH_KEYBOARD,this.showMute],[o.UIEvent.UNMUTE_WITH_KEYBOARD,this.showIncreaseVolume]],this)},e.prototype.showPause=function(){this.view.activatePauseIcon()},e.prototype.showPlay=function(){this.view.activatePlayIcon()},e.prototype.showRewind=function(){this.view.activateRewindIcon()},e.prototype.showForward=function(){this.view.activateForwardIcon()},e.prototype.showMute=function(){this.view.activateMuteVolumeIcon()},e.prototype.showIncreaseVolume=function(){this.view.activateIncreaseVolumeIcon()},e.prototype.showDecreaseVolume=function(){this.view.activateDecreaseVolumeIcon()},e.prototype.hideIcons=function(){this.view.deactivateIcon(),this._eventEmitter.emitAsync(o.UIEvent.HIDE_INTERACTION_INDICATOR)},e.prototype.show=function(){this.view.show()},e.prototype.hide=function(){this.view.hide()},e.prototype._showPlaybackChangeIndicator=function(){var e=this._engine.getCurrentState();e===o.EngineState.PLAY_REQUESTED||e===o.EngineState.PLAYING?this.view.activatePauseIcon():this.view.activatePlayIcon()},e.prototype.destroy=function(){this._unbindEvents(),this.view.destroy()},e.moduleName="interactionIndicator",e.View=r.default,e.dependencies=["engine","eventEmitter","config","rootContainer"],e}();t.default=s},86915:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(30313)),r=n(48324),s=(0,i.__importDefault)(n(61045)),a=(0,i.__importDefault)(n(87311)),l=function(e){function t(){var t=e.call(this)||this;return t._$rootElement=(0,s.default)((0,r.containerTemplate)({styles:t.styleNames})),t._playIcon=(0,r.playIconTemplate)({styles:t.styleNames}),t._pauseIcon=(0,r.pauseIconTemplate)({styles:t.styleNames}),t._forwardIcon=(0,r.forwardIconTemplate)({texts:{SECONDS_COUNT:5},styles:t.styleNames}),t._rewindIcon=(0,r.rewindIconTemplate)({texts:{SECONDS_COUNT:5},styles:t.styleNames}),t._increaseVolumeIcon=(0,r.increaseVolumeIconTemplate)({styles:t.styleNames}),t._decreaseVolumeIcon=(0,r.decreaseVolumeIconTemplate)({styles:t.styleNames}),t._muteIcon=(0,r.muteIconTemplate)({styles:t.styleNames}),t}return(0,i.__extends)(t,e),t.prototype.activatePlayIcon=function(){this._$rootElement.innerHTML=this._playIcon},t.prototype.activatePauseIcon=function(){this._$rootElement.innerHTML=this._pauseIcon},t.prototype.activateForwardIcon=function(){this._$rootElement.innerHTML=this._forwardIcon},t.prototype.activateRewindIcon=function(){this._$rootElement.innerHTML=this._rewindIcon},t.prototype.activateIncreaseVolumeIcon=function(){this._$rootElement.innerHTML=this._increaseVolumeIcon},t.prototype.activateDecreaseVolumeIcon=function(){this._$rootElement.innerHTML=this._decreaseVolumeIcon},t.prototype.activateMuteVolumeIcon=function(){this._$rootElement.innerHTML=this._muteIcon},t.prototype.deactivateIcon=function(){this._$rootElement.innerHTML=""},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null},t}(o.default);l.extendStyleNames(a.default),t.default=l},13471:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},68353:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},26493:function(e){e.exports={__esModule:!0,default:function(e){return'
'+e.texts.SECONDS_COUNT+'
'}}},79668:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},48324:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.muteIconTemplate=t.decreaseVolumeIconTemplate=t.increaseVolumeIconTemplate=t.rewindIconTemplate=t.forwardIconTemplate=t.playIconTemplate=t.pauseIconTemplate=t.containerTemplate=void 0;var i=n(92712),o=(0,i.__importDefault)(n(13471)),r=(0,i.__importDefault)(n(56192)),s=(0,i.__importDefault)(n(35761)),a=(0,i.__importDefault)(n(26493)),l=(0,i.__importDefault)(n(29973)),u=(0,i.__importDefault)(n(79668)),c=(0,i.__importDefault)(n(68353)),d=(0,i.__importDefault)(n(16549)),h=o.default.default?o.default.default:o.default;t.containerTemplate=h;var p=r.default.default?r.default.default:r.default;t.playIconTemplate=p;var f=s.default.default?s.default.default:s.default;t.pauseIconTemplate=f;var _=a.default.default?a.default.default:a.default;t.forwardIconTemplate=_;var m=l.default.default?l.default.default:l.default;t.rewindIconTemplate=m;var v=u.default.default?u.default.default:u.default;t.increaseVolumeIconTemplate=v;var y=c.default.default?c.default.default:c.default;t.decreaseVolumeIconTemplate=y;var g=d.default.default?d.default.default:d.default;t.muteIconTemplate=g},16549:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},35761:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},56192:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},29973:function(e){e.exports={__esModule:!0,default:function(e){return'
'+e.texts.SECONDS_COUNT+'
'}}},90568:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=n(24590),r=(0,i.__importStar)(n(43450)),s=(0,i.__importDefault)(n(81130)),a=function(){function e(e){var t=e.engine,n=e.eventEmitter,i=e.textMap,o=e.tooltipService;this._isHidden=!0,this._isActive=!1,this._isEnded=!1,this._engine=t,this._eventEmitter=n,this._textMap=i,this._tooltipService=o,this._bindCallbacks(),this._initUI(),this._bindEvents(),this._initInterceptor()}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._initInterceptor=function(){var e,t=this;this._interceptor=new r.default(this.getElement(),((e={})[r.KEYCODES.SPACE_BAR]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(o.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),t._syncWithLive()},e[r.KEYCODES.ENTER]=function(e){e.stopPropagation(),t._eventEmitter.emitAsync(o.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED),t._syncWithLive()},e))},Object.defineProperty(e.prototype,"isHidden",{get:function(){return this._isHidden},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isActive",{get:function(){return this._isActive},enumerable:!1,configurable:!0}),e.prototype.show=function(){this._toggle(!0)},e.prototype.hide=function(){this._toggle(!1)},e.prototype._initUI=function(){this.view=new e.View({callbacks:{onClick:this._syncWithLive},textMap:this._textMap,tooltipService:this._tooltipService})},e.prototype._bindCallbacks=function(){this._syncWithLive=this._syncWithLive.bind(this)},e.prototype._bindEvents=function(){var e=this;this._unbindEvents=this._eventEmitter.bindEvents([[o.VideoEvent.LIVE_STATE_CHANGED,this._processStateChange],[o.UIEvent.PROGRESS_SYNC_BUTTON_MOUSE_ENTER,function(){e.view.toggleActive(!0)}],[o.UIEvent.PROGRESS_SYNC_BUTTON_MOUSE_LEAVE,function(){e.view.toggleActive(e._isActive)}]],this)},e.prototype._processStateChange=function(e){switch(e.nextState){case o.LiveState.NONE:this._toggle(!1),this._toggleActive(!1),this._toggleEnded(!1);break;case o.LiveState.INITIAL:this._toggle(!0);break;case o.LiveState.SYNC:this._toggleActive(!0);break;case o.LiveState.NOT_SYNC:this._toggleActive(!1);break;case o.LiveState.ENDED:this._toggleActive(!1),this._toggleEnded(!0)}},e.prototype._syncWithLive=function(){this._isEnded||this._engine.syncWithLive()},e.prototype._toggle=function(e){this._isHidden=!e,this.view.toggle(e)},e.prototype._toggleActive=function(e){this._isActive=e,this.view.toggleActive(e)},e.prototype._toggleEnded=function(e){this._isEnded=e,this.view.toggleEnded(e)},e.prototype.destroy=function(){this._unbindEvents(),this._interceptor.destroy(),this.view.destroy()},e.moduleName="liveIndicator",e.View=s.default,e.dependencies=["engine","eventEmitter","textMap","tooltipService"],e}();t.default=a},81130:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(30313)),r=n(73459),s=(0,i.__importDefault)(n(61045)),a=(0,i.__importDefault)(n(46484)),l=(0,i.__importDefault)(n(23802)),u=(0,i.__importDefault)(n(53867)),c=n(24590),d=function(e){function t(t){var n=e.call(this)||this;return n._callbacks=t.callbacks,n._textMap=t.textMap,n._tooltipService=t.tooltipService,n._initDOM(),n._bindEvents(),n}return(0,i.__extends)(t,e),t.prototype._initDOM=function(){this._$rootElement=(0,s.default)((0,r.liveIndicatorTemplate)({styles:this.styleNames,themeStyles:this.themeStyles,texts:{}})),this._$button=(0,a.default)(this._$rootElement,"live-indicator-button"),this._tooltipReference=this._tooltipService.createReference(this._$button,{text:this._textMap.get(c.TextLabel.LIVE_SYNC_TOOLTIP)}),this.toggle(!1),this.toggleActive(!1),this.toggleEnded(!1)},t.prototype._bindEvents=function(){this._$rootElement.addEventListener("click",this._callbacks.onClick)},t.prototype._unbindEvents=function(){this._$rootElement.removeEventListener("click",this._callbacks.onClick)},t.prototype.toggleActive=function(e){(0,l.default)(this._$rootElement,this.styleNames.active,e),(0,l.default)(this._$button,this.styleNames.clickable,!e),e?(this._$button.setAttribute("disabled","true"),this._tooltipReference.disable()):(this._$button.removeAttribute("disabled"),this._tooltipReference.enable())},t.prototype.toggleEnded=function(e){(0,l.default)(this._$rootElement,this.styleNames.ended,e),this._$button.innerText=this._textMap.get(c.TextLabel.LIVE_INDICATOR_TEXT,{isEnded:e}),this._$button.setAttribute("aria-label",e?"":this._textMap.get(c.TextLabel.LIVE_SYNC_LABEL)),this._$button.setAttribute("disabled","true"),e?this._tooltipReference.disable():this._tooltipReference.enable()},t.prototype.show=function(){this.toggle(!0)},t.prototype.hide=function(){this.toggle(!1)},t.prototype.toggle=function(e){(0,l.default)(this._$rootElement,this.styleNames.hidden,!e)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._unbindEvents(),this._tooltipReference.destroy(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null,this._$button=null},t}(o.default);d.extendStyleNames(u.default),t.default=d},73459:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.liveIndicatorTemplate=void 0;var i=(0,n(92712).__importDefault)(n(17039)),o=i.default.default?i.default.default:i.default;t.liveIndicatorTemplate=o},17039:function(e){e.exports={__esModule:!0,default:function(e){return'
"}}},2952:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DELAYED_SHOW_TIMEOUT=void 0;var i=n(92712),o=n(24590),r=(0,i.__importDefault)(n(6347));t.DELAYED_SHOW_TIMEOUT=100;var s=function(){function e(e){var t=e.config,n=e.eventEmitter,i=e.engine,o=e.rootContainer;this._eventEmitter=n,this.isHidden=!1,this._engine=i,this._bindCallbacks(),this._initUI(),this._bindEvents(),this._hideContent(),o.appendComponentElement(this.getElement()),t.hideMainUI&&this.hide()}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._bindCallbacks=function(){this._showContent=this._showContent.bind(this),this._hideContent=this._hideContent.bind(this)},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[o.VideoEvent.STATE_CHANGED,this._checkForWaitingState],[o.VideoEvent.UPLOAD_SUSPEND,this.hide]],this)},e.prototype._checkForWaitingState=function(e){switch(e.nextState){case o.EngineState.SEEK_IN_PROGRESS:case o.EngineState.WAITING:this.startDelayedShow();break;case o.EngineState.LOAD_STARTED:this._engine.isPreloadActive&&this._showContent();break;case o.EngineState.READY_TO_PLAY:case o.EngineState.PLAYING:case o.EngineState.PAUSED:this.stopDelayedShow(),this._hideContent()}},e.prototype._initUI=function(){this.view=new e.View},e.prototype._showContent=function(){this.isHidden&&(this._eventEmitter.emitAsync(o.UIEvent.LOADER_SHOW),this.view.showContent(),this.isHidden=!1)},e.prototype._hideContent=function(){this.isHidden||(this._eventEmitter.emitAsync(o.UIEvent.LOADER_HIDE),this.view.hideContent(),this.isHidden=!0)},e.prototype.hide=function(){this.view.hide()},e.prototype.show=function(){this.view.show()},e.prototype.startDelayedShow=function(){this.isDelayedShowScheduled&&this.stopDelayedShow(),this._delayedShowTimeout=window.setTimeout(this._showContent,t.DELAYED_SHOW_TIMEOUT)},e.prototype.stopDelayedShow=function(){window.clearTimeout(this._delayedShowTimeout),this._delayedShowTimeout=null},Object.defineProperty(e.prototype,"isDelayedShowScheduled",{get:function(){return Boolean(this._delayedShowTimeout)},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){this._unbindEvents(),this.stopDelayedShow(),this.view.destroy()},e.moduleName="loader",e.View=r.default,e.dependencies=["engine","eventEmitter","config","rootContainer"],e}();t.default=s},6347:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(30313)),r=n(79826),s=(0,i.__importDefault)(n(61045)),a=(0,i.__importDefault)(n(24198)),l=function(e){function t(){var t=e.call(this)||this;return t._$rootElement=(0,s.default)((0,r.loaderTemplate)({styles:t.styleNames})),t}return(0,i.__extends)(t,e),t.prototype.getElement=function(){return this._$rootElement},t.prototype.showContent=function(){this._$rootElement.classList.add(this.styleNames.active)},t.prototype.hideContent=function(){this._$rootElement.classList.remove(this.styleNames.active)},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.destroy=function(){this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null},t}(o.default);l.extendStyleNames(a.default),t.default=l},79826:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loaderTemplate=void 0;var i=(0,n(92712).__importDefault)(n(19500)),o=i.default.default?i.default.default:i.default;t.loaderTemplate=o},19500:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},30533:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=n(24590),r=(0,i.__importDefault)(n(17022)),s=(0,i.__importDefault)(n(24688)),a=function(){function e(e){this._hideTimeout=null,this._isContentShowingEnabled=!0,this._isContentShown=!1,this._shouldShowContent=!0,this._shouldAlwaysShow=!1,this._isDragging=!1;var t=e.config,n=e.eventEmitter,i=e.rootContainer,o=e.tooltipService,r=e.topBlock,s=e.bottomBlock,a=e.screen;this._config=t,this._eventEmitter=n,this._topBlock=r,this._bottomBlock=s,this._screen=a,this._tooltipService=o,this.isHidden=!1,this._shouldAlwaysShow=!1,this._initUI({tooltipContainer:o.tooltipContainerElement,topBlock:r.getElement(),bottomBlock:s.getElement()}),this._bindViewCallbacks(),this._bindEvents(),i.appendComponentElement(this.view.getElement()),t.hideMainUI&&this.hide()}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._initUI=function(t){this.view=new e.View({elements:t})},e.prototype._bindViewCallbacks=function(){this._startHideBlockTimeout=this._startHideBlockTimeout.bind(this),this._tryShowContent=this._tryShowContent.bind(this),this._tryHideContent=this._tryHideContent.bind(this)},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[o.UIEvent.MOUSE_MOVE_ON_PLAYER,this._startHideBlockTimeout],[o.UIEvent.MOUSE_LEAVE_ON_PLAYER,this._tryHideContent],[o.UIEvent.FOCUS_ENTER_ON_PLAYER,this._startHideBlockTimeout],[o.UIEvent.KEYBOARD_KEYDOWN_INTERCEPTED,this._startHideBlockTimeout],[o.UIEvent.LOADER_HIDE,this._startHideBlockTimeout],[o.VideoEvent.STATE_CHANGED,this._updatePlayingState],[o.UIEvent.CONTROL_DRAG_START,this._onControlDragStart],[o.UIEvent.CONTROL_DRAG_END,this._onControlDragEnd]],this)},e.prototype._updatePlayingState=function(e){switch(e.nextState){case o.EngineState.PLAY_REQUESTED:this._shouldShowContent=!1,this._startHideBlockTimeout();break;case o.EngineState.ENDED:case o.EngineState.PAUSED:case o.EngineState.SRC_SET:this._shouldShowContent=!0,this._tryShowContent()}},Object.defineProperty(e.prototype,"_isBlockFocused",{get:function(){return this._bottomBlock.isFocused||this._topBlock.isFocused},enumerable:!1,configurable:!0}),e.prototype._startHideBlockTimeout=function(){this._stopHideBlockTimeout(),this._tryShowContent(),this._hideTimeout=window.setTimeout(this._tryHideContent,2e3)},e.prototype._stopHideBlockTimeout=function(){this._hideTimeout&&window.clearTimeout(this._hideTimeout)},e.prototype._tryShowContent=function(){this._isContentShowingEnabled&&this._showContent()},e.prototype._onControlDragStart=function(){this._isDragging=!0},e.prototype._onControlDragEnd=function(){this._isDragging=!1,this._tryHideContent()},e.prototype._showContent=function(){this._screen.showCursor(),this.isHidden||this._isContentShown||(this._eventEmitter.emitAsync(o.UIEvent.MAIN_BLOCK_SHOW),this._bottomBlock.showContent(),this._topBlock.showContent(),this._isContentShown=!0)},e.prototype._tryHideContent=function(){this._isBlockFocused||this._isDragging||this._shouldShowContent||this._shouldAlwaysShow||this._hideContent()},e.prototype._hideContent=function(){this._isContentShowingEnabled&&this._screen.hideCursor(),!this.isHidden&&this._isContentShown&&(this._eventEmitter.emitAsync(o.UIEvent.MAIN_BLOCK_HIDE),this._bottomBlock.hideContent(),this._topBlock.hideContent(),this._tooltipService.hide(),this._isContentShown=!1)},e.prototype.disableShowingContent=function(){this._isContentShowingEnabled=!1,this._hideContent()},e.prototype.enableShowingContent=function(){this._isContentShowingEnabled=!0,this._shouldShowContent&&this._showContent()},e.prototype.hide=function(){this.isHidden=!0,this._topBlock.hide(),this._bottomBlock.hide()},e.prototype.show=function(){this._config.hideMainUI||(this.isHidden=!1,this._topBlock.show(),this._bottomBlock.show())},e.prototype.setShouldAlwaysShow=function(e){this._shouldAlwaysShow=e,this._shouldAlwaysShow?this._tryShowContent():this._startHideBlockTimeout()},e.prototype.destroy=function(){this._stopHideBlockTimeout(),this._unbindEvents(),this.view.destroy()},e.moduleName="mainUIBlock",e.View=s.default,e.dependencies=["config","screen","rootContainer","tooltipService","eventEmitter","topBlock","bottomBlock"],(0,i.__decorate)([(0,r.default)("hideMainUI")],e.prototype,"hide",null),(0,i.__decorate)([(0,r.default)("showMainUI")],e.prototype,"show",null),(0,i.__decorate)([(0,r.default)("setMainUIShouldAlwaysShow")],e.prototype,"setShouldAlwaysShow",null),e}();t.default=a},24688:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(30313)),r=n(72906),s=(0,i.__importDefault)(n(61045)),a=(0,i.__importDefault)(n(51971)),l=function(e){function t(t){var n=e.call(this)||this;return n._initDOM(t.elements),n}return(0,i.__extends)(t,e),t.prototype._initDOM=function(e){this._$rootElement=(0,s.default)((0,r.mainUIBlockTemplate)({styles:this.styleNames}));var t=document.createElement("div");t.classList.add(this.styleNames.tooltipContainerWrapper),t.appendChild(e.tooltipContainer),this._$rootElement.appendChild(e.topBlock),this._$rootElement.appendChild(t),this._$rootElement.appendChild(e.bottomBlock)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null},t}(o.default);l.extendStyleNames(a.default),t.default=l},72906:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mainUIBlockTemplate=void 0;var i=(0,n(92712).__importDefault)(n(93198)),o=i.default.default?i.default.default:i.default;t.mainUIBlockTemplate=o},93198:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},25550:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=n(24590),r=(0,i.__importDefault)(n(17022)),s=(0,i.__importDefault)(n(51551)),a=function(){function e(e){var t=e.eventEmitter,n=e.engine,i=e.rootContainer,o=e.theme,r=e.config,s=e.mainUIBlock,a=e.loader;this.isHidden=!1,this._eventEmitter=t,this._engine=n,this._theme=o,this._mainUIBlock=s,this._loader=a,this._bindEvents(),this._initUI(),this.setPoster(r.poster),r.hideOverlay&&this.hide(),i.appendComponentElement(this.getElement())}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._initUI=function(){var t={callbacks:{onPlayClick:this._playVideo.bind(this)},theme:this._theme};this.view=new e.View(t)},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[o.VideoEvent.STATE_CHANGED,this._updatePlayingState],[o.VideoEvent.RESET,this._tryShowContent]],this)},e.prototype._updatePlayingState=function(e){var t=e.nextState;t===o.EngineState.PLAY_REQUESTED?this._tryHideContent():t!==o.EngineState.ENDED&&t!==o.EngineState.SRC_SET||this._tryShowContent()},e.prototype._playVideo=function(){this._engine.play(),this._eventEmitter.emitAsync(o.UIEvent.PLAY_OVERLAY_CLICK)},e.prototype._tryShowContent=function(){this.isHidden||this._engine.isPaused&&this._showContent()},e.prototype._tryHideContent=function(){this.isHidden||this._hideContent()},e.prototype._hideContent=function(){this.view.hideContent(),this._loader.show(),this._mainUIBlock.enableShowingContent()},e.prototype._showContent=function(){this.view.showContent(),this._loader.hide(),this._mainUIBlock.disableShowingContent()},e.prototype.hide=function(){this.isHidden=!0,this.view.hide()},e.prototype.show=function(){this.isHidden=!1,this.view.show()},e.prototype.setPoster=function(e){this.view.setPoster(e)},e.prototype.turnOnOverlayTransparency=function(){this.view.turnOnOverlayTransparency()},e.prototype.turnOffOverlayTransparency=function(){this.view.turnOffOverlayTransparency()},e.prototype.destroy=function(){this._unbindEvents(),this.view.destroy()},e.moduleName="overlay",e.View=s.default,e.dependencies=["engine","eventEmitter","rootContainer","theme","config","mainUIBlock","loader"],(0,i.__decorate)([(0,r.default)("hideOverlay")],e.prototype,"hide",null),(0,i.__decorate)([(0,r.default)("showOverlay")],e.prototype,"show",null),(0,i.__decorate)([(0,r.default)()],e.prototype,"setPoster",null),(0,i.__decorate)([(0,r.default)()],e.prototype,"turnOnOverlayTransparency",null),(0,i.__decorate)([(0,r.default)()],e.prototype,"turnOffOverlayTransparency",null),e}();t.default=a},69317:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={overlayPlaySvgFill:{fill:function(e){return e.color}},overlayPlaySvgStroke:{stroke:function(e){return e.color}}}},51551:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(30313)),r=n(66029),s=(0,i.__importDefault)(n(61045)),a=(0,i.__importDefault)(n(46484)),l=(0,i.__importDefault)(n(69317)),u=(0,i.__importDefault)(n(25239)),c=function(e){function t(t){var n=e.call(this,t.theme)||this,i=t.callbacks;return n._callbacks=i,n._initDOM(),n._bindEvents(),n}return(0,i.__extends)(t,e),t.prototype._initDOM=function(){this._$rootElement=(0,s.default)((0,r.overlayTemplate)({styles:this.styleNames,themeStyles:this.themeStyles})),this._$content=(0,a.default)(this._$rootElement,"overlay-content"),this._$playButton=(0,a.default)(this._$rootElement,"overlay-play-button")},t.prototype._bindEvents=function(){this._$playButton.addEventListener("click",this._callbacks.onPlayClick)},t.prototype._unbindEvents=function(){this._$playButton.removeEventListener("click",this._callbacks.onPlayClick)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.hideContent=function(){this._$rootElement.classList.remove(this.styleNames.active)},t.prototype.showContent=function(){this._$rootElement.classList.add(this.styleNames.active)},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.setPoster=function(e){this._$content.style.backgroundImage=e?"url('".concat(e,"')"):"none"},t.prototype.turnOnOverlayTransparency=function(){this._$content.classList.add(this.styleNames.transparency)},t.prototype.turnOffOverlayTransparency=function(){this._$content.classList.remove(this.styleNames.transparency)},t.prototype.destroy=function(){this._unbindEvents(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null,this._$content=null,this._$playButton=null},t}(o.default);c.setTheme(l.default),c.extendStyleNames(u.default),t.default=c},66029:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.overlayTemplate=void 0;var i=(0,n(92712).__importDefault)(n(86340)),o=i.default.default?i.default.default:i.default;t.overlayTemplate=o},86340:function(e){e.exports={__esModule:!0,default:function(e){return'
\x3c!-- padding-bottom: 100% * height/width --\x3e
'}}},29186:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=(0,n(92712).__importDefault)(n(69554)),o=function(){function e(e){var t=e.previewService,n=e.rootContainer;this._previewService=t,this._initUI(),this.hide(),n.appendComponentElement(this.getElement())}return e.prototype._initUI=function(){this.view=new e.View},e.prototype.getElement=function(){return this.view.getElement()},e.prototype.showAt=function(e){this.view.show();var t=this._previewService.getAt(e);if(t){var n=t.pop();this._currentFrame&&this._currentFrame.spriteUrl!==n.spriteUrl&&this.view.clear(),this.view.setPreview(n),this._currentFrame=n}else this.view.clear()},e.prototype.hide=function(){this.view.hide()},e.prototype.destroy=function(){this.view.destroy()},e.moduleName="previewFullSize",e.View=i.default,e.dependencies=["previewService","rootContainer"],e}();t.default=o},69554:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(30313)),r=n(40814),s=(0,i.__importDefault)(n(61045)),a=(0,i.__importDefault)(n(46484)),l=(0,i.__importDefault)(n(86025)),u=function(e){function t(){var t=e.call(this)||this;return t._initDOM(),t}return(0,i.__extends)(t,e),t.prototype._initDOM=function(){this._$rootElement=(0,s.default)((0,r.previewTemplate)({styles:this.styleNames})),this._$frame=(0,a.default)(this._$rootElement,"preview-full-size-frame")},t.prototype.getElement=function(){return this._$rootElement},t.prototype.setPreview=function(e){this._applyFrame(e)},t.prototype._applyFrame=function(e){var t=this._$frame.offsetWidth,n=this._$frame.offsetHeight,i=t*e.framesInSprite.horz,o=n*e.framesInSprite.vert;this._$frame.style.background="url('".concat(e.spriteUrl,"') -").concat(t*e.framePositionInSprite.horz,"px -").concat(n*e.framePositionInSprite.vert,"px / ").concat(i,"px ").concat(o,"px")},t.prototype.clear=function(){this._$frame.style.background=""},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.destroy=function(){this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$frame=null,this._$rootElement=null},t}(o.default);u.extendStyleNames(l.default),t.default=u},40814:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.previewTemplate=void 0;var i=(0,n(92712).__importDefault)(n(88035)),o=i.default.default?i.default.default:i.default;t.previewTemplate=o},88035:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},6277:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAt=void 0,t.getAt=function(e,t,n){var i=e.framesCount,o=Math.floor(t*i/n);return e.qualities.map((function(e){return function(e,t,n){var i=t.framesInSprite.vert*t.framesInSprite.horz,o=n%i,r=Math.floor(n/i),s=o%t.framesInSprite.horz,a=Math.floor(o/t.framesInSprite.vert),l=t.spriteUrlMask.replace("%d",r.toString());return{frameSize:t.frameSize,framesInSprite:(r+1)*i<=e?t.framesInSprite:{horz:t.framesInSprite.horz,vert:Math.ceil(e%i/t.framesInSprite.vert)},framePositionInSprite:{vert:a,horz:s},spriteUrl:l}}(i,e,o)}))}},82300:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(17022)),r=n(6277),s=function(){function e(e){var t=e.engine;this._engine=t}return e.prototype.setFramesMap=function(e){this._framesMap=e},e.prototype.getAt=function(e){if(this._framesMap){var t=this._engine.getDuration();if(t)return(0,r.getAt)(this._framesMap,e,t)}},e.prototype.destroy=function(){this._framesMap=null},e.moduleName="previewService",e.dependencies=["engine"],(0,i.__decorate)([(0,o.default)()],e.prototype,"setFramesMap",null),e}();t.default=s},37526:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=(0,n(92712).__importDefault)(n(64617)),o=function(){function e(e){var t=e.previewService;this._previewService=t,this._initUI()}return e.prototype._initUI=function(){this.view=new e.View},e.prototype.getElement=function(){return this.view.getElement()},e.prototype.showAt=function(e){var t=this._previewService.getAt(e);t?(this.view.showWithPreview(),this._currentFrames&&(this._currentFrames[0].spriteUrl!==t[0].spriteUrl&&this.view.clearLowQualityPreview(),this._currentFrames[1].spriteUrl!==t[1].spriteUrl&&this.view.clearHighQualityPreview()),this.view.setLowQualityPreview(t[0]),this.view.setHighQualityPreview(t[1]),this._currentFrames=t):this.view.showAsEmpty()},e.prototype.setTime=function(e){this.view.setTime(e)},e.prototype.destroy=function(){this.view.destroy()},e.moduleName="previewThumbnail",e.View=i.default,e.dependencies=["previewService"],e}();t.default=o},64617:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(30313)),r=n(70803),s=(0,i.__importDefault)(n(61045)),a=(0,i.__importDefault)(n(46484)),l=(0,i.__importDefault)(n(52190)),u=function(e){function t(){var t=e.call(this)||this;return t._initDOM(),t}return(0,i.__extends)(t,e),t.prototype._initDOM=function(){this._$rootElement=(0,s.default)((0,r.thumbnailTemplate)({styles:this.styleNames})),this._$timeText=(0,a.default)(this._$rootElement,"thumb-text-block"),this._$lowQualityThumb=(0,a.default)(this._$rootElement,"thumb-low-quality"),this._$highQualityThumb=(0,a.default)(this._$rootElement,"thumb-high-quality")},t.prototype.getElement=function(){return this._$rootElement},t.prototype.showAsEmpty=function(){this._$rootElement.classList.add(this.styleNames.empty)},t.prototype.showWithPreview=function(){this._$rootElement.classList.remove(this.styleNames.empty)},t.prototype.clearLowQualityPreview=function(){this._$lowQualityThumb.style.background=""},t.prototype.clearHighQualityPreview=function(){this._$highQualityThumb.style.background=""},t.prototype.setLowQualityPreview=function(e){this._applyQualityToThumbElement(this._$lowQualityThumb,e)},t.prototype.setHighQualityPreview=function(e){this._applyQualityToThumbElement(this._$highQualityThumb,e)},t.prototype._applyQualityToThumbElement=function(e,t){var n=e.offsetWidth,i=e.offsetHeight,o=n*t.framesInSprite.horz,r=i*t.framesInSprite.vert;e.style.background="url('".concat(t.spriteUrl,"') -").concat(n*t.framePositionInSprite.horz,"px -").concat(i*t.framePositionInSprite.vert,"px / ").concat(o,"px ").concat(r,"px")},t.prototype.setTime=function(e){this._$timeText.innerText=e},t.prototype.destroy=function(){this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$timeText=null,this._$lowQualityThumb=null,this._$highQualityThumb=null,this._$rootElement=null},t}(o.default);u.extendStyleNames(l.default),t.default=u},70803:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.thumbnailTemplate=void 0;var i=(0,n(92712).__importDefault)(n(88386)),o=i.default.default?i.default.default:i.default;t.thumbnailTemplate=o},88386:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},59057:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=n(24590),r=(0,i.__importDefault)(n(22366)),s=(0,i.__importDefault)(n(17022)),a=function(){function e(e){var t=e.config,n=e.eventEmitter,i=e.engine,o=e.fullScreenManager,r=e.interactionIndicator,s=e.rootContainer;this._eventEmitter=n,this._engine=i,this._fullScreenManager=o,this._interactionIndicator=r,this.isHidden=!1,this._delayedToggleVideoPlaybackTimeout=null,this._isClickProcessingDisabled=Boolean(t.disableControlWithClickOnPlayer),this._bindCallbacks(),this._initUI(t.nativeBrowserControls),this._bindEvents(),s.appendComponentElement(this.getElement())}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._bindCallbacks=function(){this._processClick=this._processClick.bind(this),this._processDblClick=this._processDblClick.bind(this),this._toggleVideoPlayback=this._toggleVideoPlayback.bind(this)},e.prototype._initUI=function(e){var t={nativeControls:e,callbacks:{onWrapperMouseClick:this._processClick,onWrapperMouseDblClick:this._processDblClick},playbackViewElement:this._engine.getElement()};this.view=new r.default(t)},e.prototype._bindEvents=function(){this._unbindEvents=this._eventEmitter.bindEvents([[o.UIEvent.PLAY_OVERLAY_CLICK,this.view.focusOnNode,this.view],[o.UIEvent.RESIZE,this._updateSizes],[o.EngineState.SRC_SET,this.view.resetBackground,this.view],[o.EngineState.METADATA_LOADED,this.view.resetAspectRatio,this.view]],this)},e.prototype._updateSizes=function(e){var t=e.width,n=e.height;this.view.setBackgroundSize(t,n),this.view.resetAspectRatio()},e.prototype.showCursor=function(){this.view.showCursor()},e.prototype.hideCursor=function(){this.view.hideCursor()},e.prototype._processClick=function(){this._isClickProcessingDisabled||(this._showPlaybackChangeIndicator(),this._fullScreenManager.isEnabled?this._setDelayedPlaybackToggle():this._toggleVideoPlayback())},e.prototype._processDblClick=function(){this._isClickProcessingDisabled||this._fullScreenManager.isEnabled&&(this._isDelayedPlaybackToggleExist&&(this._clearDelayedPlaybackToggle(),this._hideDelayedPlaybackChangeIndicator()),this._toggleFullScreen())},e.prototype._showPlaybackChangeIndicator=function(){var e=this._engine.getCurrentState();e===o.EngineState.PLAY_REQUESTED||e===o.EngineState.PLAYING?this._interactionIndicator.showPause():this._interactionIndicator.showPlay()},e.prototype._hideDelayedPlaybackChangeIndicator=function(){this._interactionIndicator.hideIcons()},e.prototype._setDelayedPlaybackToggle=function(){this._clearDelayedPlaybackToggle(),this._delayedToggleVideoPlaybackTimeout=window.setTimeout(this._toggleVideoPlayback,300)},e.prototype._clearDelayedPlaybackToggle=function(){window.clearTimeout(this._delayedToggleVideoPlaybackTimeout),this._delayedToggleVideoPlaybackTimeout=null},Object.defineProperty(e.prototype,"_isDelayedPlaybackToggleExist",{get:function(){return Boolean(this._delayedToggleVideoPlaybackTimeout)},enumerable:!1,configurable:!0}),e.prototype._toggleVideoPlayback=function(){this._clearDelayedPlaybackToggle();var e=this._engine.getCurrentState();e===o.EngineState.PLAY_REQUESTED||e===o.EngineState.PLAYING?(this._engine.pause(),this._eventEmitter.emitAsync(o.UIEvent.PAUSE_WITH_SCREEN_CLICK)):(this._engine.play(),this._eventEmitter.emitAsync(o.UIEvent.PLAY_WITH_SCREEN_CLICK))},e.prototype._toggleFullScreen=function(){this._fullScreenManager.isInFullScreen?(this._fullScreenManager.exitFullScreen(),this._eventEmitter.emitAsync(o.UIEvent.EXIT_FULL_SCREEN_WITH_SCREEN_CLICK)):(this._fullScreenManager.enterFullScreen(),this._eventEmitter.emitAsync(o.UIEvent.ENTER_FULL_SCREEN_WITH_SCREEN_CLICK))},e.prototype.hide=function(){this.isHidden||(this.view.hide(),this.isHidden=!0)},e.prototype.show=function(){this.isHidden&&(this.view.show(),this.isHidden=!1)},e.prototype.setVideoViewMode=function(e){this.view.setViewMode(e)},e.prototype.destroy=function(){this._unbindEvents(),this._clearDelayedPlaybackToggle(),this.view.destroy()},e.moduleName="screen",e.View=r.default,e.dependencies=["engine","eventEmitter","config","fullScreenManager","interactionIndicator","rootContainer"],(0,i.__decorate)([(0,s.default)()],e.prototype,"setVideoViewMode",null),e}();t.default=a},22366:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(30313)),r=n(87085),s=(0,i.__importDefault)(n(61045)),a=(0,i.__importDefault)(n(46484)),l=(0,i.__importDefault)(n(23802)),u=n(5777),c=(0,i.__importDefault)(n(31175)),d=function(e){function t(t){var n,i=e.call(this)||this,o=t.callbacks,r=t.nativeControls,s=t.playbackViewElement;return i._callbacks=o,i._styleNamesByViewMode=((n={})[u.VideoViewMode.REGULAR]=i.styleNames.regularMode,n[u.VideoViewMode.BLUR]=i.styleNames.blurMode,n[u.VideoViewMode.FILL]=i.styleNames.fillMode,n),i._bindCallbacks(),r&&s.setAttribute("controls","true"),i._initDOM(s),i._bindEvents(),i.setViewMode(u.VideoViewMode.REGULAR),i}return(0,i.__extends)(t,e),t.prototype._bindCallbacks=function(){this._updateBackground=this._updateBackground.bind(this)},t.prototype._initDOM=function(e){this._$rootElement=(0,s.default)((0,r.screenTemplate)({styles:this.styleNames})),this._$playbackElement=e,this._$rootElement.appendChild(e),this._$canvas=(0,a.default)(this._$rootElement,"background-canvas")},t.prototype._bindEvents=function(){this._$rootElement.addEventListener("click",this._callbacks.onWrapperMouseClick),this._$rootElement.addEventListener("dblclick",this._callbacks.onWrapperMouseDblClick)},t.prototype._unbindEvents=function(){this._$rootElement.removeEventListener("click",this._callbacks.onWrapperMouseClick),this._$rootElement.removeEventListener("dblclick",this._callbacks.onWrapperMouseDblClick)},t.prototype.focusOnNode=function(){this._$rootElement.focus()},t.prototype.show=function(){(0,l.default)(this._$rootElement,this.styleNames.hidden,!1)},t.prototype.hide=function(){(0,l.default)(this._$rootElement,this.styleNames.hidden,!0)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.hideCursor=function(){(0,l.default)(this._$rootElement,this.styleNames.hiddenCursor,!0)},t.prototype.showCursor=function(){(0,l.default)(this._$rootElement,this.styleNames.hiddenCursor,!1)},t.prototype.setViewMode=function(e){var t=this;this._styleNamesByViewMode[e]&&(this.resetBackground(),Object.keys(this._styleNamesByViewMode).forEach((function(e){(0,l.default)(t._$rootElement,t._styleNamesByViewMode[e],!1)})),(0,l.default)(this._$rootElement,this._styleNamesByViewMode[e],!0),e===u.VideoViewMode.BLUR?this._startUpdatingBackground():this._stopUpdatingBackground(),this._currentMode=e)},t.prototype.setBackgroundSize=function(e,t){this.setBackgroundWidth(e),this.setBackgroundHeight(t)},t.prototype.setBackgroundWidth=function(e){this._$canvas.width=e},t.prototype.setBackgroundHeight=function(e){this._$canvas.height=e},t.prototype._startUpdatingBackground=function(){this._requestAnimationFrameID||this._updateBackground()},t.prototype._stopUpdatingBackground=function(){this._requestAnimationFrameID&&(cancelAnimationFrame(this._requestAnimationFrameID),this._requestAnimationFrameID=null)},t.prototype.resetAspectRatio=function(){var e=this._$playbackElement,t=e.videoWidth,n=e.videoHeight,i=this._$rootElement.getBoundingClientRect(),o=i.width,r=i.height;this._isHorizontalStripes=o/r<(n?t/n:0),(0,l.default)(this._$rootElement,this.styleNames.horizontalStripes,this._isHorizontalStripes),(0,l.default)(this._$rootElement,this.styleNames.verticalStripes,!this._isHorizontalStripes)},t.prototype.resetBackground=function(){this._currentMode===u.VideoViewMode.BLUR&&this._clearBackground()},t.prototype._getSourceAreas=function(e,t){return this._isHorizontalStripes?[[0,0,e,1],[0,t-1,e,1]]:[[0,0,1,t],[e-1,0,1,t]]},t.prototype._getCanvasAreas=function(e,t){return this._isHorizontalStripes?[[0,0,e,t/2],[0,t/2,e,t/2]]:[[0,0,e/2,t],[e/2,0,e/2,t]]},t.prototype._drawAreaFromSource=function(e,t){var n=e[0],i=e[1],o=e[2],r=e[3],s=t[0],a=t[1],l=t[2],u=t[3];this._$canvas.getContext("2d").drawImage(this._$playbackElement,n,i,o,r,s,a,l,u)},t.prototype._drawBackground=function(){var e=this._$playbackElement,t=e.videoWidth,n=e.videoHeight,i=this._$canvas.width,o=this._$canvas.height,r=this._getSourceAreas(t,n),s=this._getCanvasAreas(i,o);this._drawAreaFromSource(r[0],s[0]),this._drawAreaFromSource(r[1],s[1])},t.prototype._updateBackground=function(){this._drawBackground(),this._requestAnimationFrameID=requestAnimationFrame(this._updateBackground)},t.prototype._clearBackground=function(){this._$canvas.getContext("2d").clearRect(0,0,this._$canvas.width,this._$canvas.height)},t.prototype.destroy=function(){this._stopUpdatingBackground(),this._unbindEvents(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null,this._$playbackElement=null,this._$canvas=null},t}(o.default);d.extendStyleNames(c.default),t.default=d},87085:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.screenTemplate=void 0;var i=(0,n(92712).__importDefault)(n(41143)),o=i.default.default?i.default.default:i.default;t.screenTemplate=o},41143:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},5777:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.VideoViewMode=void 0,function(e){e.REGULAR="REGULAR",e.BLUR="BLUR",e.FILL="FILL"}(n||(n={})),t.VideoViewMode=n},20632:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.titleTemplate=void 0;var i=(0,n(92712).__importDefault)(n(72425)),o=i.default.default?i.default.default:i.default;t.titleTemplate=o},72425:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},53983:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(34325)),r=(0,i.__importDefault)(n(17022)),s=function(){function e(e){var t=e.theme,n=e.config;this._theme=t,this._bindCallbacks(),this._initUI(),this.setTitle(n.title)}return e.prototype.getElement=function(){return this.view.getElement()},e.prototype._bindCallbacks=function(){this._triggerCallback=this._triggerCallback.bind(this)},e.prototype._initUI=function(){var t={theme:this._theme,callbacks:{onClick:this._triggerCallback}};this.view=new e.View(t),this.view.setTitle()},e.prototype.setTitle=function(e){this.view.setTitle(e)},e.prototype.setTitleClickCallback=function(e){this._callback=e,this.view.setDisplayAsLink(Boolean(this._callback))},e.prototype._triggerCallback=function(){this._callback&&this._callback()},e.prototype.hide=function(){this.isHidden=!0,this.view.hide()},e.prototype.show=function(){this.isHidden=!1,this.view.show()},e.prototype.destroy=function(){this.view.destroy()},e.moduleName="title",e.View=o.default,e.dependencies=["config","theme"],(0,i.__decorate)([(0,r.default)()],e.prototype,"setTitle",null),(0,i.__decorate)([(0,r.default)()],e.prototype,"setTitleClickCallback",null),e}();t.default=s},265:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={titleText:{color:function(e){return e.color}}}},34325:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(30313)),r=n(20632),s=(0,i.__importDefault)(n(61045)),a=(0,i.__importDefault)(n(23802)),l=(0,i.__importDefault)(n(265)),u=(0,i.__importDefault)(n(59932)),c=function(e){function t(t){var n=this,i=t.callbacks,o=t.theme;return(n=e.call(this,o)||this)._callbacks=i,n._initDOM(),n._bindEvents(),n}return(0,i.__extends)(t,e),t.prototype._initDOM=function(){this._$rootElement=(0,s.default)((0,r.titleTemplate)({styles:this.styleNames,themeStyles:this.themeStyles}))},t.prototype._bindEvents=function(){this._$rootElement.addEventListener("click",this._callbacks.onClick)},t.prototype._unbindEvents=function(){this._$rootElement.removeEventListener("click",this._callbacks.onClick)},t.prototype.setDisplayAsLink=function(e){(0,a.default)(this._$rootElement,this.styleNames.link,e)},t.prototype.setTitle=function(e){e?(this.show(),this._$rootElement.innerHTML=e):this.hide()},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.getElement=function(){return this._$rootElement},t.prototype.destroy=function(){this._unbindEvents(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null},t}(o.default);c.setTheme(l.default),c.extendStyleNames(u.default),t.default=c},11805:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.topBlockTemplate=void 0;var i=(0,n(92712).__importDefault)(n(63978)),o=i.default.default?i.default.default:i.default;t.topBlockTemplate=o},63978:function(e){e.exports={__esModule:!0,default:function(e){return'
'}}},20407:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(17022)),r=(0,i.__importDefault)(n(16409)),s=function(){function e(e){this._isBlockFocused=!1,this.isHidden=!1,this._bindViewCallbacks(),this._initUI(this._getElements(e))}return e.prototype._bindViewCallbacks=function(){this._setFocusState=this._setFocusState.bind(this),this._removeFocusState=this._removeFocusState.bind(this)},e.prototype._initUI=function(t){var n={elements:t,callbacks:{onBlockMouseMove:this._setFocusState,onBlockMouseOut:this._removeFocusState}};this.view=new e.View(n)},e.prototype._getElements=function(e){var t=e.title,n=e.liveIndicator;return{title:t.getElement(),liveIndicator:n.getElement()}},e.prototype._setFocusState=function(){this._isBlockFocused=!0},e.prototype._removeFocusState=function(){this._isBlockFocused=!1},Object.defineProperty(e.prototype,"isFocused",{get:function(){return this._isBlockFocused},enumerable:!1,configurable:!0}),e.prototype.getElement=function(){return this.view.getElement()},e.prototype.hide=function(){this.isHidden=!0,this.view.hide()},e.prototype.show=function(){this.isHidden=!1,this.view.show()},e.prototype.showTitle=function(){this.view.showTitle()},e.prototype.hideTitle=function(){this.view.hideTitle()},e.prototype.showLiveIndicator=function(){this.view.showLiveIndicator()},e.prototype.hideLiveIndicator=function(){this.view.hideLiveIndicator()},e.prototype.showContent=function(){this.view.showContent()},e.prototype.hideContent=function(){this.view.hideContent()},e.prototype.destroy=function(){this.view.destroy()},e.moduleName="topBlock",e.View=r.default,e.dependencies=["title","liveIndicator"],(0,i.__decorate)([(0,o.default)()],e.prototype,"showTitle",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"hideTitle",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"showLiveIndicator",null),(0,i.__decorate)([(0,o.default)()],e.prototype,"hideLiveIndicator",null),e}();t.default=s},16409:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712),o=(0,i.__importDefault)(n(30313)),r=(0,i.__importDefault)(n(61045)),s=(0,i.__importDefault)(n(46484)),a=n(11805),l=(0,i.__importDefault)(n(14600)),u=function(e){function t(t){var n=e.call(this)||this,i=t.callbacks,o=t.elements;return n._callbacks=i,n._initDOM(o),n._bindEvents(),n}return(0,i.__extends)(t,e),t.prototype.getElement=function(){return this._$rootElement},t.prototype._initDOM=function(e){this._$rootElement=(0,r.default)((0,a.topBlockTemplate)({styles:this.styleNames})),this._$titleContainer=(0,s.default)(this._$rootElement,"title-container"),this._$liveIndicatorContainer=(0,s.default)(this._$rootElement,"live-indicator-container"),this._$titleContainer.appendChild(e.title),this._$liveIndicatorContainer.appendChild(e.liveIndicator)},t.prototype._preventClickPropagation=function(e){e.stopPropagation()},t.prototype._bindEvents=function(){this._$rootElement.addEventListener("click",this._preventClickPropagation),this._$rootElement.addEventListener("mousemove",this._callbacks.onBlockMouseMove),this._$rootElement.addEventListener("mouseleave",this._callbacks.onBlockMouseOut)},t.prototype._unbindEvents=function(){this._$rootElement.removeEventListener("click",this._preventClickPropagation),this._$rootElement.removeEventListener("mousemove",this._callbacks.onBlockMouseMove),this._$rootElement.removeEventListener("mouseleave",this._callbacks.onBlockMouseOut)},t.prototype.show=function(){this._$rootElement.classList.remove(this.styleNames.hidden)},t.prototype.hide=function(){this._$rootElement.classList.add(this.styleNames.hidden)},t.prototype.showContent=function(){this._$rootElement.classList.add(this.styleNames.activated)},t.prototype.hideContent=function(){this._$rootElement.classList.remove(this.styleNames.activated)},t.prototype.showTitle=function(){this._$titleContainer.classList.remove(this.styleNames.hidden)},t.prototype.hideTitle=function(){this._$titleContainer.classList.add(this.styleNames.hidden)},t.prototype.showLiveIndicator=function(){this._$liveIndicatorContainer.classList.remove(this.styleNames.hidden)},t.prototype.hideLiveIndicator=function(){this._$liveIndicatorContainer.classList.add(this.styleNames.hidden)},t.prototype.destroy=function(){this._unbindEvents(),this._$rootElement.parentNode&&this._$rootElement.parentNode.removeChild(this._$rootElement),this._$rootElement=null},t}(o.default);u.extendStyleNames(l.default),t.default=u},56398:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSafari=t.isDesktopSafari=t.isAndroid=t.isIOS=t.isIPad=t.isIPod=t.isIPhone=void 0;var n=/iphone/i,i=/ipod/i,o=/ipad/i,r=/(android)/i,s=/^((?!chrome|android).)*safari/i,a=/^((?!chrome|android|iphone|ipod|ipad).)*safari/i,l=function(){return!!window.MSStream},u=function(){return window.navigator&&window.navigator.userAgent},c=function(){return!l()&&n.test(u())};t.isIPhone=c;var d=function(){return!l()&&i.test(u())};t.isIPod=d;var h=function(){return!l()&&o.test(u())};t.isIPad=h;t.isIOS=function(){return c()||d()||h()};t.isAndroid=function(){return r.test(u())};t.isDesktopSafari=function(){return a.test(u())};t.isSafari=function(){return s.test(u())}},33023:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NativeEnvironmentSupport=t.isBrowser=void 0,t.isBrowser="undefined"!=typeof window,t.NativeEnvironmentSupport={MSE:!1,HLS:!1,DASH:!1,MP4:!1,WEBM:!1,OGG:!1,MOV:!1,MKV:!1},function(){if(t.isBrowser){t.NativeEnvironmentSupport.MSE="WebKitMediaSource"in window||"MediaSource"in window;var e=document.createElement("video");"function"==typeof e.canPlayType&&((e.canPlayType("application/x-mpegURL")||e.canPlayType("application/vnd.apple.mpegURL"))&&(t.NativeEnvironmentSupport.HLS=!0),e.canPlayType("application/dash+xml")&&(t.NativeEnvironmentSupport.DASH=!0),e.canPlayType("video/mp4")&&(t.NativeEnvironmentSupport.MP4=!0),e.canPlayType("video/webm")&&(t.NativeEnvironmentSupport.WEBM=!0),e.canPlayType("video/ogg")&&(t.NativeEnvironmentSupport.OGG=!0),e.canPlayType("video/quicktime")&&(t.NativeEnvironmentSupport.MOV=!0),e.canPlayType("video/x-matroska")&&(t.NativeEnvironmentSupport.MKV=!0))}}()},43450:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEYCODES=void 0;var i=n(92712),o=n(4399),r=(0,i.__importDefault)(n(35005));t.KEYCODES={SPACE_BAR:32,ENTER:13,TAB:9,LEFT_ARROW:37,RIGHT_ARROW:39,UP_ARROW:38,DOWN_ARROW:40,DEBUG_KEY:68};var s=function(){function e(e,t){this._eventEmitter=new o.EventEmitter,this._element=e,t&&this._attachCallbacks(t),this._bindCallbacks(),this._bindEvents()}return e.prototype._attachCallbacks=function(e){var t=this;Object.keys(e).forEach((function(n){var i=e[n];Array.isArray(i)?i.forEach((function(e){return t._eventEmitter.on(n,e)})):t._eventEmitter.on(n,i)}))},e.prototype._unattachCallbacks=function(){this._eventEmitter.removeAllListeners()},e.prototype._bindCallbacks=function(){this._processKeyboardInput=this._processKeyboardInput.bind(this)},e.prototype._bindEvents=function(){this._element.addEventListener("keydown",this._processKeyboardInput,!1)},e.prototype._unbindEvents=function(){this._element.removeEventListener("keydown",this._processKeyboardInput,!1)},e.prototype.addCallbacks=function(e){this._attachCallbacks(e)},e.prototype._processKeyboardInput=function(e){this._eventEmitter.emit(e.keyCode,e)},Object.defineProperty(e.prototype,"_isDestroyed",{get:function(){return!this._element&&!this._eventEmitter},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){this._isDestroyed?r.default.warn("KeyboardInterceptor.destroy called after already been destroyed"):(this._unbindEvents(),this._element=null,this._unattachCallbacks(),this._eventEmitter=null)},e}();t.default=s},35005:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92712);t.default={info:function(e){for(var t,n=[],o=1;o0},e.prototype.connect_=function(){o&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){o&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;a.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),c=function(e,t){for(var n=0,i=Object.keys(t);n0},e}(),w="undefined"!=typeof WeakMap?new WeakMap:new i,T=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),i=new b(t,n,this);w.set(this,i)};["observe","unobserve","disconnect"].forEach((function(e){T.prototype[e]=function(){var t;return(t=w.get(this))[e].apply(t,arguments)}}));var S=void 0!==r.ResizeObserver?r.ResizeObserver:T;t.default=S},11681:function(e,t,n){var i=n(1365).FilterCSS,o=n(1365).getDefaultWhiteList,r=n(50923);function s(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var a=new i;function l(e){return e.replace(u,"<").replace(c,">")}var u=//g,d=/"/g,h=/"/g,p=/&#([a-zA-Z0-9]*);?/gim,f=/:?/gim,_=/&newline;?/gim,m=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,v=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,y=/u\s*r\s*l\s*\(.*/gi;function g(e){return e.replace(d,""")}function E(e){return e.replace(h,'"')}function b(e){return e.replace(p,(function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))}))}function w(e){return e.replace(f,":").replace(_," ")}function T(e){for(var t="",n=0,i=e.length;n0;t--){var n=e[t];if(" "!==n)return"="===n?t:-1}}function c(e){return function(e){return'"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1]}(e)?e.substr(1,e.length-2):e}t.parseTag=function(e,t,n){"use strict";var i="",s=0,a=!1,l=!1,u=0,c=e.length,d="",h="";e:for(u=0;u"===p||u===c-1){i+=n(e.slice(s,a)),d=o(h=e.slice(a,u+1)),i+=t(a,i.length,d,h,r(h)),s=u+1,a=!1;continue}if('"'===p||"'"===p)for(var f=1,_=e.charAt(u-f);""===_.trim()||"="===_;){if("="===_){l=p;continue e}_=e.charAt(u-++f)}}else if(p===l){l=!1;continue}}return s";var y=function(e){var t=l.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};var n="/"===(e=l.trim(e.slice(t+1,-1)))[e.length-1];return n&&(e=l.trim(e.slice(0,-1))),{html:e,closing:n}}(s),g=n[o],E=a(y.html,(function(e,t){var n=-1!==l.indexOf(g,e),i=c(o,e,t,n);return u(i)?n?(t=h(o,e,t,f))?e+'="'+t+'"':e:u(i=d(o,e,t,n))?void 0:i:i}));return s="<"+o,E&&(s+=" "+E),y.closing&&(s+=" /"),s+=">"}return u(v=r(o,s,m))?p(s):v}),p);return _&&(m=_.remove(m)),m},e.exports=c},34408:function(e,t,n){var i=n(65204),o=n(78096);n(65352);function r(e){return null==e}function s(e){(e=function(e){var t={};for(var n in e)t[n]=e[n];return t}(e||{})).whiteList=e.whiteList||i.whiteList,e.onAttr=e.onAttr||i.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||i.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||i.safeAttrValue,this.options=e}s.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,n=t.whiteList,i=t.onAttr,s=t.onIgnoreAttr,a=t.safeAttrValue;return o(e,(function(e,t,o,l,u){var c=n[o],d=!1;if(!0===c?d=c:"function"==typeof c?d=c(l):c instanceof RegExp&&(d=c.test(l)),!0!==d&&(d=!1),l=a(o,l)){var h,p={position:t,sourcePosition:e,source:u,isWhite:d};return d?r(h=i(o,l,p))?o+":"+l:h:r(h=s(o,l,p))?void 0:h}}))},e.exports=s},65204:function(e,t){function n(){var e={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return e}var i=/javascript\s*\:/gim;t.whiteList=n(),t.getDefaultWhiteList=n,t.onAttr=function(e,t,n){},t.onIgnoreAttr=function(e,t,n){},t.safeAttrValue=function(e,t){return i.test(t)?"":t}},1365:function(e,t,n){var i=n(65204),o=n(34408);for(var r in(t=e.exports=function(e,t){return new o(t).process(e)}).FilterCSS=o,i)t[r]=i[r];"undefined"!=typeof window&&(window.filterCSS=e.exports)},78096:function(e,t,n){var i=n(65352);e.exports=function(e,t){";"!==(e=i.trimRight(e))[e.length-1]&&(e+=";");var n=e.length,o=!1,r=0,s=0,a="";function l(){if(!o){var n=i.trim(e.slice(r,s)),l=n.indexOf(":");if(-1!==l){var u=i.trim(n.slice(0,l)),c=i.trim(n.slice(l+1));if(u){var d=t(r,a.length,u,c,n);d&&(a+=d+"; ")}}}r=s+1}for(;s=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}function l(e,t){return function(n,i){t(n,i,e)}}function u(e,t,n,i,o,r){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,l=i.kind,u="getter"===l?"get":"setter"===l?"set":"value",c=!t&&e?i.static?e:e.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,i.name):{}),h=!1,p=n.length-1;p>=0;p--){var f={};for(var _ in i)f[_]="access"===_?{}:i[_];for(var _ in i.access)f.access[_]=i.access[_];f.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");r.push(s(e||null))};var m=(0,n[p])("accessor"===l?{get:d.get,set:d.set}:d[u],f);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(a=s(m.get))&&(d.get=a),(a=s(m.set))&&(d.set=a),(a=s(m.init))&&o.unshift(a)}else(a=s(m))&&("field"===l?o.unshift(a):d[u]=a)}c&&Object.defineProperty(c,i.name,d),h=!0}function c(e,t,n){for(var i=arguments.length>2,o=0;o0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s}function E(){for(var e=[],t=0;t1||a(e,t)}))})}function a(e,t){try{(n=o[e](t)).value instanceof T?Promise.resolve(n.value.v).then(l,u):c(r[0][2],n)}catch(e){c(r[0][3],e)}var n}function l(e){a("next",e)}function u(e){a("throw",e)}function c(e,t){e(t),r.shift(),r.length&&a(r[0][0],r[0][1])}}function P(e){var t,n;return t={},i("next"),i("throw",(function(e){throw e})),i("return"),t[Symbol.iterator]=function(){return this},t;function i(i,o){t[i]=e[i]?function(t){return(n=!n)?{value:T(e[i](t)),done:!1}:o?o(t):t}:o}}function I(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=y(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(n){t[n]=e[n]&&function(t){return new Promise((function(i,o){(function(e,t,n,i){Promise.resolve(i).then((function(t){e({value:t,done:n})}),t)})(i,o,(t=e[n](t)).done,t.value)}))}}}function O(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var C=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function L(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&m(t,e,n);return C(t,e),t}function A(e){return e&&e.__esModule?e:{default:e}}function k(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)}function M(e,t,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?o.call(e,n):o?o.value=n:t.set(e,n),n}function D(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function N(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var i;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=t[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=t[Symbol.dispose]}if("function"!=typeof i)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:i,async:n})}else n&&e.stack.push({async:!0});return t}var x="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var i=new Error(n);return i.name="SuppressedError",i.error=e,i.suppressed=t,i};function R(e){function t(t){e.error=e.hasError?new x(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(;e.stack.length;){var i=e.stack.pop();try{var o=i.dispose&&i.dispose.call(i.value);if(i.async)return Promise.resolve(o).then(n,(function(e){return t(e),n()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}t.default={__extends:o,__assign:r,__rest:s,__decorate:a,__param:l,__metadata:p,__awaiter:f,__generator:_,__createBinding:m,__exportStar:v,__values:y,__read:g,__spread:E,__spreadArrays:b,__spreadArray:w,__await:T,__asyncGenerator:S,__asyncDelegator:P,__asyncValues:I,__makeTemplateObject:O,__importStar:L,__importDefault:A,__classPrivateFieldGet:k,__classPrivateFieldSet:M,__classPrivateFieldIn:D,__addDisposableResource:N,__disposeResources:R}}},i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={id:e,exports:{}};return n[e].call(r.exports,r,r.exports,o),r.exports}o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";o.r(r),o.d(r,{components:function(){return ao}});var e={};o.r(e),o.d(e,{STATIC_MEDIA_URL:function(){return zt},ph:function(){return Gt}});var t=o(448),n=o.n(t),i=o(5329),s=o.n(i);const a=(e,t=0,{leading:n=!1,trailing:i=!0}={})=>{let o=null;return function(...r){n&&null===o&&e.apply(this,r),o&&clearTimeout(o),o=i&&n&&!o?setTimeout((()=>{o=null}),t):setTimeout((()=>{i&&e.apply(this,r),o=null}),t)}},l=e=>Object.entries(e).reduce(((e,[t,n])=>(t.includes("data-")&&(e[t]=n),e)),{});const u="wixui-",c=(e,...t)=>{const n=[];return e&&n.push(`${u}${e}`),t.forEach((e=>{e&&(n.push(`${u}${e}`),n.push(e))})),n.join(" ")},d=()=>{const e=s().useRef(),t=s().useRef([]);return[()=>void 0!==e.current?Promise.resolve(e.current):new Promise((e=>{t.current.push(e)})),()=>e.current,n=>{e.current=n,t.current.forEach((e=>e(n))),t.current=[]},()=>e.current=void 0]},h=()=>"function"==typeof window.IntersectionObserver;const p=e=>{const[t,n]=i.useState(!1),o=function(e,t){void 0===t&&(t=!1);const[n,o]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{if(!h())return o(t),()=>{};const n=e.current;if(n&&h()){const e=new window.IntersectionObserver((e=>{const t=e[e.length-1];o(t.isIntersecting)}));return e.observe(n),()=>{e.disconnect()}}return()=>{}}),[e,t]),n}(e,!0);return i.useEffect((()=>{o&&n(!0)}),[o]),t};var f={root:"video-player"};((e,t,n=[])=>{e.reduce(((e,t)=>({...e,[t]:!0})),{}),n.length})(["isSocialElementsBlocked"],(e=>{let{isSocialElementsBlocked:t}=e;return t?"WithConsentWrapper":void 0}));const _=e=>({consentPolicy:e.currentConsentPolicy,openSettingModal:()=>e.openSettingModal([])});var m=o(57061);const v=e=>(0,i.useEffect)(e,[]);function y(e,t){const n=function(e,t){void 0===t&&(t=null);const n=(0,i.useRef)(t);return(0,i.useEffect)((()=>{n.current=e}),[e]),n.current}(e,e);e!==n&&t(n)}const g="playable-cover",E="playable",b="dailymotion",w="twitch",T="youtube",S="facebook",P="vimeo",I="playable-title";function O(e){window.loadScriptPromises=window.loadScriptPromises||{};for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;inew Promise(((e,t)=>{const n=function(){const e=window.document.createElement("script");return e.defer=!0,e.async=!0,e.src=C,e}();n.addEventListener("load",(()=>e(A()))),n.addEventListener("error",t),window.document.body.insertBefore(n,window.document.body.firstChild)}));function A(){return window.Twitch}var k={name:"twitch",loader:()=>Boolean(A())?Promise.resolve(A()):(e=>"function"==typeof e.require&&"function"==typeof e.define&&e.define.amd)(window)?new Promise(((e,t)=>window.require([C],(t=>{window.Twitch=t,e(t)}),t))):L()};var M=()=>{const e=i.useRef(0),t=i.useRef([]),n=()=>{clearTimeout(e.current)},o=()=>{n(),t.current.forEach((e=>e())),e.current=setTimeout(o,1e3)};return i.useEffect((()=>{n()}),[]),{update:o,stop:n,subscribe:e=>{t.current.push(e)}}};const D=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/,N=/(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/;const x=(e,t)=>{const{src:n,playing:o,muted:r,volume:s=0,onReady:a,onInit:l,onDuration:u,onProgress:c,onPlay:h,onPause:p,onEnded:f,onFirstPlay:_,onFirstEnded:g,twitchParentDomains:E}=e,b=i.useRef(null),T=i.useRef(null),S=i.useRef(!1),P=i.useRef(!1),I=i.useRef(!1),[C,L]=d(),A=M(),{channelId:x,videoId:R}=(e=>{const t=N.test(e);return{channelId:t?e.match(N)[1]:"",videoId:t?"":e.match(D)[1]}})(n),[B,F]=((e,t,n)=>{const[i,o,r]=d();return v((()=>{O(k).then((i=>{t.current=i,r(new i.Player(e.current,n))})).catch((e=>{throw e}))})),[i,o]})(b,T,{video:R,channel:x,height:"100%",width:"100%",playsinline:!0,autoplay:o,muted:r,parent:E});return v((()=>{B().then((e=>{!function(e,t,n,i,o,r,s,a,l){let{onReady:u,onPlay:c,onPause:d,onEnded:h,onDuration:p,onProgress:f,onFirstPlay:_,onFirstEnded:m}=n;const{READY:v,PLAY:y,PAUSE:g,ENDED:E}=t;if(r.subscribe((()=>{null==f||f(e.getCurrentTime()||0)})),p){const t=setInterval((()=>{const n=e.getDuration();n&&(i(n),clearInterval(t))}),1e3)}e.addEventListener(v,(()=>{p&&o().then((e=>p(e))).catch((e=>{throw e})),null==u||u()})),e.addEventListener(y,(()=>{l.current||(l.current=!0,null==_||_()),s.current=!0,null==c||c(),r.update()})),e.addEventListener(g,(()=>{s.current=!1,null==d||d(),r.stop()})),e.addEventListener(E,(()=>{a.current||(a.current=!0,null==m||m()),s.current=!1,null==h||h(),r.stop()}))}(e,T.current.Player,{onReady:a,onPlay:h,onPause:p,onEnded:f,onDuration:u,onProgress:c,onFirstPlay:_,onFirstEnded:g},L,C,A,S,I,I),null==l||l(e,"twitch")})).catch((e=>{throw e}))})),((e,t,n,i)=>{let{src:o,playing:r,muted:s,volume:a}=e;y(o,(()=>{t.current=!1,n.current=!1})),y(r,(()=>i().then((e=>r?e.play():e.pause())))),y(s,(()=>i().then((e=>e.setMuted(s))))),y(a,(()=>i().then((e=>e.setVolume(a/100)))))})({src:n,playing:o,muted:r,volume:s},P,I,B),i.useImperativeHandle(t,(()=>((e,t,n)=>{const i={play:()=>e().then((e=>e.play())),pause:()=>e().then((e=>e.pause())),togglePlay:()=>n.current?i.pause():i.play(),getDuration:async()=>{const e=t();return e&&e.getDuration()||0},getCurrentTime:async()=>{const e=t();return e&&e.getCurrentTime()||0},seekTo:t=>e().then((e=>e.seek(t))),getVolume:async()=>{const e=t();return e?100*e.getVolume():0},setVolume:t=>e().then((e=>e.setVolume(t/100))),isMuted:async()=>{const e=t();return!e||e.getMuted()},isPlaying:()=>n.current,mute:()=>e().then((e=>e.setMuted(!0))),unMute:()=>e().then((e=>e.setMuted(!1)))};return i})(B,F,S))),i.createElement("div",{ref:b,className:m.classes.playerContainer,"data-player-name":"Twitch","data-testid":w})};var R=i.forwardRef(x);function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t","|","\u201c",":",'"'].map(encodeURIComponent),He=["\\.","\\*"],Ge="_";function Ye(e){return function(e){return xe.includes(We(e))}(e)?Ae.JPG:Fe(e)?Ae.PNG:$e(e)?Ae.WEBP:Ue(e)?Ae.GIF:Ve(e)?Ae.AVIF:Ae.UNRECOGNIZED}function We(e){return(/[.]([^.]+)$/.exec(e)&&/[.]([^.]+)$/.exec(e)[1]||"").toLowerCase()}function ze(e,t,n,i,o){let r;return r=o===me.FILL?function(e,t,n,i){return Math.max(n/e,i/t)}(e,t,n,i):o===me.FIT?function(e,t,n,i){return Math.min(n/e,i/t)}(e,t,n,i):1,r}function Ke(e,t,n,i,o,r){e=e||i.width,t=t||i.height;const{scaleFactor:s,width:a,height:l}=function(e,t,n,i,o){let r,s=n,a=i;if(r=ze(e,t,n,i,o),o===me.FIT&&(s=e*r,a=t*r),s&&a&&s*a>Pe){const n=Math.sqrt(Pe/(s*a));s*=n,a*=n,r=ze(e,t,s,a,o)}return{scaleFactor:r,width:s,height:a}}(e,t,i.width*o,i.height*o,n);return function(e,t,n,i,o,r,s){const{optimizedScaleFactor:a,upscaleMethodValue:l,forceUSM:u}=function(e,t,n,i){if("auto"===i)return function(e,t){const n=Ze(e,t);return{optimizedScaleFactor:Oe[n].maxUpscale,upscaleMethodValue:we.classic,forceUSM:!1}}(e,t);if("super"===i)return function(e){return{optimizedScaleFactor:De(Ie),upscaleMethodValue:we.super,forceUSM:!(Ie.includes(e)||e>De(Ie))}}(n);return function(e,t){const n=Ze(e,t);return{optimizedScaleFactor:Oe[n].maxUpscale,upscaleMethodValue:we.classic,forceUSM:!1}}(e,t)}(e,t,r,o);let c=n,d=i;if(r<=a)return{width:c,height:d,scaleFactor:r,upscaleMethodValue:l,forceUSM:u,cssUpscaleNeeded:!1};switch(s){case me.FILL:c=n*(a/r),d=i*(a/r);break;case me.FIT:c=e*a,d=t*a}return{width:c,height:d,scaleFactor:a,upscaleMethodValue:l,forceUSM:u,cssUpscaleNeeded:!0}}(e,t,a,l,r,s,n)}function qe(e,t,n,i){const o=Xe(n)||function(e=ve.CENTER){return ye[e]}(i);return{x:Math.max(0,Math.min(e.width-t.width,o.x*e.width-t.width/2)),y:Math.max(0,Math.min(e.height-t.height,o.y*e.height-t.height/2)),width:Math.min(e.width,t.width),height:Math.min(e.height,t.height)}}function Qe(e){return e.alignment&&ge[e.alignment]||ge[ve.CENTER]}function Xe(e){let t;return!e||"number"!=typeof e.x||isNaN(e.x)||"number"!=typeof e.y||isNaN(e.y)||(t={x:Je(Math.max(0,Math.min(100,e.x))/100,2),y:Je(Math.max(0,Math.min(100,e.y))/100,2)}),t}function Ze(e,t){const n=e*t;return n>Oe[Ce.HIGH].size?Ce.HIGH:n>Oe[Ce.MEDIUM].size?Ce.MEDIUM:n>Oe[Ce.LOW].size?Ce.LOW:Ce.TINY}function Je(e,t){const n=Math.pow(10,t||0);return(e*n/n).toFixed(t)}function et(e){return e&&e.upscaleMethod&&be[e.upscaleMethod.toUpperCase()]||be.AUTO}function tt(e,t){const n=$e(e)||Ve(e);return We(e)===Ae.GIF||n&&t}const nt={isMobile:!1},it=function(e){return nt[e]};function ot(){if("undefined"!=typeof window&&"undefined"!=typeof navigator){const t=window.matchMedia&&window.matchMedia("(max-width: 767px)").matches,n=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);e=t&&n,nt["isMobile"]=e}var e}function rt(e,t){const n={css:{container:{}}},{css:i}=n,{fittingType:o}=e;switch(o){case _e.ORIGINAL_SIZE:case _e.LEGACY_ORIGINAL_SIZE:case _e.LEGACY_STRIP_ORIGINAL_SIZE:i.container.backgroundSize="auto",i.container.backgroundRepeat="no-repeat";break;case _e.SCALE_TO_FIT:case _e.LEGACY_STRIP_SCALE_TO_FIT:i.container.backgroundSize="contain",i.container.backgroundRepeat="no-repeat";break;case _e.STRETCH:i.container.backgroundSize="100% 100%",i.container.backgroundRepeat="no-repeat";break;case _e.SCALE_TO_FILL:case _e.LEGACY_STRIP_SCALE_TO_FILL:i.container.backgroundSize="cover",i.container.backgroundRepeat="no-repeat";break;case _e.TILE_HORIZONTAL:case _e.LEGACY_STRIP_TILE_HORIZONTAL:i.container.backgroundSize="auto",i.container.backgroundRepeat="repeat-x";break;case _e.TILE_VERTICAL:case _e.LEGACY_STRIP_TILE_VERTICAL:i.container.backgroundSize="auto",i.container.backgroundRepeat="repeat-y";break;case _e.TILE:case _e.LEGACY_STRIP_TILE:i.container.backgroundSize="auto",i.container.backgroundRepeat="repeat";break;case _e.LEGACY_STRIP_FIT_AND_TILE:i.container.backgroundSize="contain",i.container.backgroundRepeat="repeat";break;case _e.FIT_AND_TILE:case _e.LEGACY_BG_FIT_AND_TILE:i.container.backgroundSize="auto",i.container.backgroundRepeat="repeat";break;case _e.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:i.container.backgroundSize="auto",i.container.backgroundRepeat="repeat-x";break;case _e.LEGACY_BG_FIT_AND_TILE_VERTICAL:i.container.backgroundSize="auto",i.container.backgroundRepeat="repeat-y";break;case _e.LEGACY_BG_NORMAL:i.container.backgroundSize="auto",i.container.backgroundRepeat="no-repeat"}switch(t.alignment){case ve.CENTER:i.container.backgroundPosition="center center";break;case ve.LEFT:i.container.backgroundPosition="left center";break;case ve.RIGHT:i.container.backgroundPosition="right center";break;case ve.TOP:i.container.backgroundPosition="center top";break;case ve.BOTTOM:i.container.backgroundPosition="center bottom";break;case ve.TOP_RIGHT:i.container.backgroundPosition="right top";break;case ve.TOP_LEFT:i.container.backgroundPosition="left top";break;case ve.BOTTOM_RIGHT:i.container.backgroundPosition="right bottom";break;case ve.BOTTOM_LEFT:i.container.backgroundPosition="left bottom"}return n}const st={[ve.CENTER]:"center",[ve.TOP]:"top",[ve.TOP_LEFT]:"top left",[ve.TOP_RIGHT]:"top right",[ve.BOTTOM]:"bottom",[ve.BOTTOM_LEFT]:"bottom left",[ve.BOTTOM_RIGHT]:"bottom right",[ve.LEFT]:"left",[ve.RIGHT]:"right"},at={position:"absolute",top:"auto",right:"auto",bottom:"auto",left:"auto"};function lt(e,t){const n={css:{container:{},img:{}}},{css:i}=n,{fittingType:o}=e,r=t.alignment;switch(i.container.position="relative",o){case _e.ORIGINAL_SIZE:case _e.LEGACY_ORIGINAL_SIZE:e.parts&&e.parts.length?(i.img.width=e.parts[0].width,i.img.height=e.parts[0].height):(i.img.width=e.src.width,i.img.height=e.src.height);break;case _e.SCALE_TO_FIT:case _e.LEGACY_FIT_WIDTH:case _e.LEGACY_FIT_HEIGHT:case _e.LEGACY_FULL:i.img.width=t.width,i.img.height=t.height,i.img.objectFit="contain",i.img.objectPosition=st[r]||"unset";break;case _e.LEGACY_BG_NORMAL:i.img.width="100%",i.img.height="100%",i.img.objectFit="none",i.img.objectPosition=st[r]||"unset";break;case _e.STRETCH:i.img.width=t.width,i.img.height=t.height,i.img.objectFit="fill";break;case _e.SCALE_TO_FILL:i.img.width=t.width,i.img.height=t.height,i.img.objectFit="cover"}if("number"==typeof i.img.width&&"number"==typeof i.img.height&&(i.img.width!==t.width||i.img.height!==t.height)){const e=Math.round((t.height-i.img.height)/2),n=Math.round((t.width-i.img.width)/2);Object.assign(i.img,at,function(e,t,n){return{[ve.TOP_LEFT]:{top:0,left:0},[ve.TOP_RIGHT]:{top:0,right:0},[ve.TOP]:{top:0,left:t},[ve.BOTTOM_LEFT]:{bottom:0,left:0},[ve.BOTTOM_RIGHT]:{bottom:0,right:0},[ve.BOTTOM]:{bottom:0,left:t},[ve.RIGHT]:{top:e,right:0},[ve.LEFT]:{top:e,left:0},[ve.CENTER]:{width:n.width,height:n.height,objectFit:"none"}}}(e,n,t)[r])}return n}function ut(e,t){const n={css:{container:{}},attr:{container:{},img:{}}},{css:i,attr:o}=n,{fittingType:r}=e,s=t.alignment,{width:a,height:l}=e.src;let u;switch(i.container.position="relative",r){case _e.ORIGINAL_SIZE:case _e.LEGACY_ORIGINAL_SIZE:case _e.TILE:e.parts&&e.parts.length?(o.img.width=e.parts[0].width,o.img.height=e.parts[0].height):(o.img.width=a,o.img.height=l),o.img.preserveAspectRatio="xMidYMid slice";break;case _e.SCALE_TO_FIT:case _e.LEGACY_FIT_WIDTH:case _e.LEGACY_FIT_HEIGHT:case _e.LEGACY_FULL:o.img.width="100%",o.img.height="100%",o.img.transform="",o.img.preserveAspectRatio="";break;case _e.STRETCH:o.img.width=t.width,o.img.height=t.height,o.img.x=0,o.img.y=0,o.img.transform="",o.img.preserveAspectRatio="none";break;case _e.SCALE_TO_FILL:Be(e.src.id)?(o.img.width=t.width,o.img.height=t.height):(u=function(e,t,n,i,o){const r=ze(e,t,n,i,o);return{width:Math.round(e*r),height:Math.round(t*r)}}(a,l,t.width,t.height,me.FILL),o.img.width=u.width,o.img.height=u.height),o.img.x=0,o.img.y=0,o.img.transform="",o.img.preserveAspectRatio="xMidYMid slice"}if("number"==typeof o.img.width&&"number"==typeof o.img.height&&(o.img.width!==t.width||o.img.height!==t.height)){let e,n,i=0,a=0;r===_e.TILE?(e=t.width%o.img.width,n=t.height%o.img.height):(e=t.width-o.img.width,n=t.height-o.img.height);const l=Math.round(e/2),u=Math.round(n/2);switch(s){case ve.TOP_LEFT:i=0,a=0;break;case ve.TOP:i=l,a=0;break;case ve.TOP_RIGHT:i=e,a=0;break;case ve.LEFT:i=0,a=u;break;case ve.CENTER:i=l,a=u;break;case ve.RIGHT:i=e,a=u;break;case ve.BOTTOM_LEFT:i=0,a=n;break;case ve.BOTTOM:i=l,a=n;break;case ve.BOTTOM_RIGHT:i=e,a=n}o.img.x=i,o.img.y=a}return o.container.width=t.width,o.container.height=t.height,o.container.viewBox=[0,0,t.width,t.height].join(" "),n}function ct(e,t,n){let i;switch(t.crop&&(i=function(e,t){const n=Math.max(0,Math.min(e.width,t.x+t.width)-Math.max(0,t.x)),i=Math.max(0,Math.min(e.height,t.y+t.height)-Math.max(0,t.y));return n&&i&&(e.width!==n||e.height!==i)?{x:Math.max(0,t.x),y:Math.max(0,t.y),width:n,height:i}:null}(t,t.crop),i&&(e.src.width=i.width,e.src.height=i.height,e.src.isCropped=!0,e.parts.push(ht(i)))),e.fittingType){case _e.SCALE_TO_FIT:case _e.LEGACY_FIT_WIDTH:case _e.LEGACY_FIT_HEIGHT:case _e.LEGACY_FULL:case _e.FIT_AND_TILE:case _e.LEGACY_BG_FIT_AND_TILE:case _e.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:case _e.LEGACY_BG_FIT_AND_TILE_VERTICAL:case _e.LEGACY_BG_NORMAL:e.parts.push(dt(e,n));break;case _e.SCALE_TO_FILL:e.parts.push(function(e,t){const n=Ke(e.src.width,e.src.height,me.FILL,t,e.devicePixelRatio,e.upscaleMethod),i=Xe(e.focalPoint);return{transformType:i?me.FILL_FOCAL:me.FILL,width:Math.round(n.width),height:Math.round(n.height),alignment:Qe(t),focalPointX:i&&i.x,focalPointY:i&&i.y,upscale:n.scaleFactor>1,forceUSM:n.forceUSM,scaleFactor:n.scaleFactor,cssUpscaleNeeded:n.cssUpscaleNeeded,upscaleMethodValue:n.upscaleMethodValue}}(e,n));break;case _e.STRETCH:e.parts.push(function(e,t){const n=ze(e.src.width,e.src.height,t.width,t.height,me.FILL),i={...t};return i.width=e.src.width*n,i.height=e.src.height*n,dt(e,i)}(e,n));break;case _e.TILE_HORIZONTAL:case _e.TILE_VERTICAL:case _e.TILE:case _e.LEGACY_ORIGINAL_SIZE:case _e.ORIGINAL_SIZE:i=qe(e.src,n,e.focalPoint,n.alignment),e.src.isCropped?(Object.assign(e.parts[0],i),e.src.width=i.width,e.src.height=i.height):e.parts.push(ht(i));break;case _e.LEGACY_STRIP_TILE_HORIZONTAL:case _e.LEGACY_STRIP_TILE_VERTICAL:case _e.LEGACY_STRIP_TILE:case _e.LEGACY_STRIP_ORIGINAL_SIZE:e.parts.push(function(e){return{transformType:me.LEGACY_CROP,width:Math.round(e.width),height:Math.round(e.height),alignment:Qe(e),upscale:!1,forceUSM:!1,scaleFactor:1,cssUpscaleNeeded:!1}}(n));break;case _e.LEGACY_STRIP_SCALE_TO_FIT:case _e.LEGACY_STRIP_FIT_AND_TILE:e.parts.push(function(e){return{transformType:me.FIT,width:Math.round(e.width),height:Math.round(e.height),upscale:!1,forceUSM:!0,scaleFactor:1,cssUpscaleNeeded:!1}}(n));break;case _e.LEGACY_STRIP_SCALE_TO_FILL:e.parts.push(function(e){return{transformType:me.LEGACY_FILL,width:Math.round(e.width),height:Math.round(e.height),alignment:Qe(e),upscale:!1,forceUSM:!0,scaleFactor:1,cssUpscaleNeeded:!1}}(n))}}function dt(e,t){const n=Ke(e.src.width,e.src.height,me.FIT,t,e.devicePixelRatio,e.upscaleMethod);return{transformType:!e.src.width||!e.src.height?me.FIT:me.FILL,width:Math.round(n.width),height:Math.round(n.height),alignment:ge.center,upscale:n.scaleFactor>1,forceUSM:n.forceUSM,scaleFactor:n.scaleFactor,cssUpscaleNeeded:n.cssUpscaleNeeded,upscaleMethodValue:n.upscaleMethodValue}}function ht(e){return{transformType:me.CROP,x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height),upscale:!1,forceUSM:!1,scaleFactor:1,cssUpscaleNeeded:!1}}function pt(e,t){t=t||{},e.quality=function(e,t){const n=e.fileType===Ae.PNG,i=e.fileType===Ae.JPG,o=e.fileType===Ae.WEBP,r=e.fileType===Ae.AVIF,s=i||n||o||r;if(s){const i=De(e.parts),o=(a=i.width,l=i.height,Oe[Ze(a,l)].quality);let r=t.quality&&t.quality>=5&&t.quality<=90?t.quality:o;return r=n?r+5:r,r}var a,l;return 0}(e,t),e.progressive=function(e){return!1!==e.progressive}(t),e.watermark=function(e){return e.watermark}(t),e.autoEncode=t.autoEncode??!0,e.encoding=t?.encoding,e.unsharpMask=function(e,t){if(function(e){const t="number"==typeof(e=e||{}).radius&&!isNaN(e.radius)&&e.radius>=.1&&e.radius<=500,n="number"==typeof e.amount&&!isNaN(e.amount)&&e.amount>=0&&e.amount<=10,i="number"==typeof e.threshold&&!isNaN(e.threshold)&&e.threshold>=0&&e.threshold<=255;return t&&n&&i}(t.unsharpMask))return{radius:Je(t.unsharpMask?.radius,2),amount:Je(t.unsharpMask?.amount,2),threshold:Je(t.unsharpMask?.threshold,2)};if(("number"!=typeof(n=(n=t.unsharpMask)||{}).radius||isNaN(n.radius)||0!==n.radius||"number"!=typeof n.amount||isNaN(n.amount)||0!==n.amount||"number"!=typeof n.threshold||isNaN(n.threshold)||0!==n.threshold)&&function(e){const t=De(e.parts);return!(t.scaleFactor>=1)||t.forceUSM||t.transformType===me.FIT}(e))return Te;var n;return}(e,t),e.filters=function(e){const t=e.filters||{},n={};ft(t[Le.CONTRAST],-100,100)&&(n[Le.CONTRAST]=t[Le.CONTRAST]);ft(t[Le.BRIGHTNESS],-100,100)&&(n[Le.BRIGHTNESS]=t[Le.BRIGHTNESS]);ft(t[Le.SATURATION],-100,100)&&(n[Le.SATURATION]=t[Le.SATURATION]);ft(t[Le.HUE],-180,180)&&(n[Le.HUE]=t[Le.HUE]);ft(t[Le.BLUR],0,100)&&(n[Le.BLUR]=t[Le.BLUR]);return n}(t)}function ft(e,t,n){return"number"==typeof e&&!isNaN(e)&&0!==e&&e>=t&&e<=n}function _t(e,t,n,i){const o=function(e){return e?.isSEOBot??!1}(i),r=Ye(t.id),s=function(e,t){const n=/\.([^.]*)$/,i=new RegExp(`(${je.concat(He).join("|")})`,"g");if(t&&t.length){let e=t;const o=t.match(n);return o&&Ne.includes(o[1])&&(e=t.replace(n,"")),encodeURIComponent(e).replace(i,Ge)}const o=e.match(/\/(.*?)$/);return(o?o[1]:e).replace(n,"")}(t.id,t.name),a=o?1:function(e){return Math.min(e.pixelAspectRatio||1,ce)}(n),l=We(t.id),u=l,c=Be(t.id,i?.hasAnimation,i?.allowAnimatedTransform),d={fileName:s,fileExtension:l,fileType:r,fittingType:e,preferredExtension:u,src:{id:t.id,width:t.width,height:t.height,isCropped:!1,isAnimated:tt(t.id,i?.hasAnimation)},focalPoint:{x:t.focalPoint&&t.focalPoint.x,y:t.focalPoint&&t.focalPoint.y},parts:[],devicePixelRatio:a,quality:0,upscaleMethod:et(i),progressive:!0,watermark:"",unsharpMask:{},filters:{},transformed:c};return c&&(ct(d,t,n),pt(d,i)),d}function mt(e,t,n){const i={...n},o=it("isMobile");switch(e){case _e.LEGACY_BG_FIT_AND_TILE:case _e.LEGACY_BG_FIT_AND_TILE_HORIZONTAL:case _e.LEGACY_BG_FIT_AND_TILE_VERTICAL:case _e.LEGACY_BG_NORMAL:const e=o?pe:de,n=o?fe:he;i.width=Math.min(e,t.width),i.height=Math.min(n,Math.round(i.width/(t.width/t.height))),i.pixelAspectRatio=1}return i}const vt=Me`fit/w_${"width"},h_${"height"}`,yt=Me`fill/w_${"width"},h_${"height"},al_${"alignment"}`,gt=Me`fill/w_${"width"},h_${"height"},fp_${"focalPointX"}_${"focalPointY"}`,Et=Me`crop/x_${"x"},y_${"y"},w_${"width"},h_${"height"}`,bt=Me`crop/w_${"width"},h_${"height"},al_${"alignment"}`,wt=Me`fill/w_${"width"},h_${"height"},al_${"alignment"}`,Tt=Me`,lg_${"upscaleMethodValue"}`,St=Me`,q_${"quality"}`,Pt=Me`,quality_auto`,It=Me`,usm_${"radius"}_${"amount"}_${"threshold"}`,Ot=Me`,bl`,Ct=Me`,wm_${"watermark"}`,Lt={[Le.CONTRAST]:Me`,con_${"contrast"}`,[Le.BRIGHTNESS]:Me`,br_${"brightness"}`,[Le.SATURATION]:Me`,sat_${"saturation"}`,[Le.HUE]:Me`,hue_${"hue"}`,[Le.BLUR]:Me`,blur_${"blur"}`},At=Me`,enc_auto`,kt=Me`,enc_avif`,Mt=Me`,enc_pavif`,Dt=Me`,pstr`;function Nt(e,t,n,i={},o){if(Be(t.id,i?.hasAnimation,i?.allowAnimatedTransform)){if($e(t.id)||Ve(t.id)){const{alignment:r,...s}=n;t.focalPoint={x:void 0,y:void 0},delete t?.crop,o=_t(e,t,s,i)}else o=o||_t(e,t,n,i);return function(e){const t=[];e.parts.forEach((e=>{switch(e.transformType){case me.CROP:t.push(Et(e));break;case me.LEGACY_CROP:t.push(bt(e));break;case me.LEGACY_FILL:let n=wt(e);e.upscale&&(n+=Tt(e)),t.push(n);break;case me.FIT:let i=vt(e);e.upscale&&(i+=Tt(e)),t.push(i);break;case me.FILL:let o=yt(e);e.upscale&&(o+=Tt(e)),t.push(o);break;case me.FILL_FOCAL:let r=gt(e);e.upscale&&(r+=Tt(e)),t.push(r)}}));let n=t.join("/");return e.quality&&(n+=St(e)),e.unsharpMask&&(n+=It(e.unsharpMask)),e.progressive||(n+=Ot(e)),e.watermark&&(n+=Ct(e)),e.filters&&(n+=Object.keys(e.filters).map((t=>Lt[t](e.filters))).join("")),e.fileType!==Ae.GIF&&(e.encoding===ke.AVIF?(n+=kt(e),n+=Pt(e)):e.encoding===ke.PAVIF?(n+=Mt(e),n+=Pt(e)):e.autoEncode&&(n+=At(e))),e.src?.isAnimated&&e.transformed&&(n+=Dt(e)),`${e.src.id}/${ue}/${n}/${e.fileName}.${e.preferredExtension}`}(o)}return t.id}const xt={[ve.CENTER]:"50% 50%",[ve.TOP_LEFT]:"0% 0%",[ve.TOP_RIGHT]:"100% 0%",[ve.TOP]:"50% 0%",[ve.BOTTOM_LEFT]:"0% 100%",[ve.BOTTOM_RIGHT]:"100% 100%",[ve.BOTTOM]:"50% 100%",[ve.RIGHT]:"100% 50%",[ve.LEFT]:"0% 50%"},Rt=Object.entries(xt).reduce(((e,[t,n])=>(e[n]=t,e)),{}),Bt=[_e.TILE,_e.TILE_HORIZONTAL,_e.TILE_VERTICAL,_e.LEGACY_BG_FIT_AND_TILE,_e.LEGACY_BG_FIT_AND_TILE_HORIZONTAL,_e.LEGACY_BG_FIT_AND_TILE_VERTICAL],Ft=[_e.LEGACY_ORIGINAL_SIZE,_e.ORIGINAL_SIZE,_e.LEGACY_BG_NORMAL];function $t(e,t,{width:n,height:i}){return e===_e.TILE&&t.width>n&&t.height>i}function Ut(e,{width:t,height:n}){if(!t||!n){const i=t||Math.min(980,e.width),o=i/e.width;return{width:i,height:n||e.height*o}}return{width:t,height:n}}function Vt(e,t,n,i="center"){const o={img:{},container:{}};if(e===_e.SCALE_TO_FILL){const e=t.focalPoint&&function(e){const t=`${e.x}% ${e.y}%`;return Rt[t]||""}(t.focalPoint),r=e||i;t.focalPoint&&!e?o.img={objectPosition:jt(t,n,t.focalPoint)}:o.img={objectPosition:xt[r]}}else[_e.LEGACY_ORIGINAL_SIZE,_e.ORIGINAL_SIZE].includes(e)?o.img={objectFit:"none",top:"auto",left:"auto",right:"auto",bottom:"auto"}:Bt.includes(e)&&(o.container={backgroundSize:`${t.width}px ${t.height}px`});return o}function jt(e,t,n){const{width:i,height:o}=e,{width:r,height:s}=t,{x:a,y:l}=n;if(!r||!s)return`${a}% ${l}%`;const u=Math.max(r/i,s/o),c=i*u,d=o*u,h=Math.max(0,Math.min(c-r,c*(a/100)-r/2)),p=Math.max(0,Math.min(d-s,d*(l/100)-s/2));return`${h&&Math.floor(h/(c-r)*100)}% ${p&&Math.floor(p/(d-s)*100)}%`}const Ht={width:"100%",height:"100%"};function Gt(e,t,n,i={}){const{autoEncode:o=!0,isSEOBot:r,shouldLoadHQImage:s,hasAnimation:a,allowAnimatedTransform:l,encoding:u}=i;if(!Re(e,t,n))return Se;const c=void 0===l||l,d=Be(t.id,a,c);if(!d||s)return Yt(e,t,n,{...i,autoEncode:o,useSrcset:d});const h={...n,...Ut(t,n)},{alignment:p,htmlTag:f}=h,_=$t(e,t,h),m=function(e,t,{width:n,height:i},o=!1){if(o)return{width:n,height:i};const r=!Ft.includes(e),s=$t(e,t,{width:n,height:i}),a=!s&&Bt.includes(e),l=a?t.width:n,u=a?t.height:i,c=r?function(e,t){return e>900?t?.05:.15:e>500?t?.1:.18:e>200?.25:1}(l,Fe(t.id)):1;return{width:s?1920:l*c,height:u*c}}(e,t,h,r),v=function(e,t,n){return n?0:Bt.includes(t)?1:e>200?2:3}(h.width,e,r),y=function(e,t){const n=Bt.includes(e)&&!t;return e===_e.SCALE_TO_FILL||n?_e.SCALE_TO_FIT:e}(e,_),g=Vt(e,t,n,p),{uri:E}=Yt(y,t,{...m,alignment:p,htmlTag:f},{autoEncode:o,filters:v?{blur:v}:{},hasAnimation:a,allowAnimatedTransform:c,encoding:u}),{attr:b={},css:w}=Yt(e,t,{...h,alignment:p,htmlTag:f},{});return w.img=w.img||{},w.container=w.container||{},Object.assign(w.img,g.img,Ht),Object.assign(w.container,g.container),{uri:E,css:w,attr:b,transformed:!0}}function Yt(e,t,n,i){let o={};if(Re(e,t,n)){const r=mt(e,t,n),s=_t(e,t,r,i);o.uri=Nt(e,t,r,i,s),i?.useSrcset&&(o.srcset=function(e,t,n,i,o){const r=n.pixelAspectRatio||1;return{dpr:[`${1===r?o.uri:Nt(e,t,{...n,pixelAspectRatio:1},i)} 1x`,`${2===r?o.uri:Nt(e,t,{...n,pixelAspectRatio:2},i)} 2x`]}}(e,t,r,i,o)),Object.assign(o,function(e,t){let n;return n=t.htmlTag===Ee.BG?rt:t.htmlTag===Ee.SVG?ut:lt,n(e,t)}(s,r),{transformed:s.transformed})}else o=Se;return o}const Wt="https://static.wixstatic.com/media/";"undefined"!=typeof window&&window.devicePixelRatio;ot();ot();const zt=Wt,{STATIC_MEDIA_URL:Kt}=e,qt=({fittingType:e,src:t,target:n,options:i})=>{const o=Gt(e,t,n,{...i,autoEncode:!0});return o?.uri&&!/^[a-z]+:/.test(o.uri)&&(o.uri=`${Kt}${o.uri}`),o},Qt=/^[a-z]+:/,Xt=e=>{const{id:t,containerId:n,uri:o,alt:r,name:s="",role:a,width:l,height:u,displayMode:c,devicePixelRatio:d,quality:h,alignType:p,bgEffectName:f="",focalPoint:_,upscaleMethod:m,className:v="",crop:y,imageStyles:g={},targetWidth:E,targetHeight:b,targetScale:w,onLoad:T=()=>{},onError:S=()=>{},shouldUseLQIP:P,containerWidth:I,containerHeight:O,getPlaceholder:C,isInFirstFold:L,placeholderTransition:A,socialAttrs:k,isSEOBot:M,skipMeasure:D,hasAnimation:N,encoding:x}=e,R=i.useRef(null);let B="";const F="blur"===A,$=i.useRef(null);if(!$.current)if(C||P||L||M){const e={upscaleMethod:m,...h||{},shouldLoadHQImage:L,isSEOBot:M,hasAnimation:N,encoding:x};$.current=(C||qt)({fittingType:c,src:{id:o,width:l,height:u,crop:y,name:s,focalPoint:_},target:{width:I,height:O,alignment:p,htmlTag:"img"},options:e}),B=!$.current.transformed||L||M?"":"true"}else $.current={uri:void 0,css:{img:{}},attr:{img:{},container:{}},transformed:!1};const U=!M&&(C||P)&&!L&&$.current.transformed,V=i.useMemo((()=>JSON.stringify({containerId:n,...n&&{containerId:n},...p&&{alignType:p},...D&&{skipMeasure:!0},displayMode:c,...I&&{targetWidth:I},...O&&{targetHeight:O},...E&&{targetWidth:E},...b&&{targetHeight:b},...w&&{targetScale:w},isLQIP:U,isSEOBot:M,lqipTransition:A,encoding:x,imageData:{width:l,height:u,uri:o,name:s,displayMode:c,hasAnimation:N,...h&&{quality:h},...d&&{devicePixelRatio:d},..._&&{focalPoint:_},...y&&{crop:y},...m&&{upscaleMethod:m}}})),[n,p,D,c,I,O,E,b,w,U,M,A,x,l,u,o,s,N,h,d,_,y,m]),j=$.current,H=j?.uri,G=j?.srcset,Y=j.css?.img,W=`${le} ${v}`;i.useEffect((()=>{const e=R.current;T&&e?.currentSrc&&e?.complete&&T({target:e})}),[]);const z=j&&!j?.transformed?`max(${l}px, 100%)`:E?`${E}px`:null;return i.createElement("wow-image",{id:t,class:W,"data-image-info":V,"data-motion-part":`BG_IMG ${n}`,"data-bg-effect-name":f,"data-has-ssr-src":B,"data-animate-blur":!M&&U&&F?"":void 0,style:z?{"--wix-img-max-width":z}:{}},i.createElement("img",{src:H,ref:R,alt:r||"",role:a,style:{...Y,...g},onLoad:T,onError:S,width:I||void 0,height:O||void 0,...k,srcSet:L?G?.dpr?.map((e=>Qt.test(e)?e:`${Kt}${e}`)).join(", "):void 0,fetchpriority:L?"high":void 0,loading:!1===L?"lazy":void 0,suppressHydrationWarning:!0}))};var Zt="Tj01hh";function Jt(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t{var t,o;const{id:r,alt:s,role:a,className:l,imageStyles:u={},targetWidth:c,targetHeight:d,onLoad:h,onError:p,containerWidth:f,containerHeight:_,isInFirstFold:m,socialAttrs:v,skipMeasure:y,responsiveImageProps:g,zoomedImageResponsiveOverride:E,displayMode:b}=e,w=c||f,T=d||_,{fallbackSrc:S,srcset:P,sources:I,css:O}=g||{},{width:C,height:L,...A}=(null==g||null==(t=g.css)?void 0:t.img)||{},k="original_size"===b?null==g||null==(o=g.css)?void 0:o.img:A;var M;return S&&P&&O?i.createElement("img",n()({fetchpriority:m?"high":void 0,loading:!1===m?"lazy":void 0,sizes:w+"px",srcSet:y?null==E?void 0:E.srcset:null==g?void 0:g.srcset,id:r,src:S,alt:s||"",role:a,style:{...u,...y?{...null==E||null==(M=E.css)?void 0:M.img}:{...k}},onLoad:h,onError:p,className:en(l,Zt),width:w,height:T},v)):S&&I&&O?i.createElement("picture",null,I.map((e=>{let{srcset:t,media:n,sizes:o}=e;return i.createElement("source",{key:n,srcSet:t,media:n,sizes:o})})),i.createElement("img",n()({fetchpriority:m?"high":void 0,loading:!1===m?"lazy":void 0,id:r,src:I[0].fallbackSrc,alt:s||"",role:a,style:{...u,objectFit:I[0].imgStyle.objectFit,objectPosition:I[0].imgStyle.objectPosition},onLoad:h,onError:p,className:en(l,Zt),width:w,height:T},v))):i.createElement(Xt,e)},on=o(1835);function rn(){return rn=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{title:t,showTitle:n,translations:o}=e;return i.createElement("div",{className:on.classes.overlay},n&&t&&i.createElement("div",{title:t,"data-testid":I,className:on.classes.title},t),i.createElement("button",{className:on.classes.playButton,"aria-label":o.playVideoAriaLabel},i.createElement(sn,null)))};var ln=e=>{let{id:t,showTitle:o,title:r,poster:s,hideOverlay:a,playing:l,description:u,hasBeenPlayed:c,onPlay:d,className:h,translations:p}=e;return a||l||c?null:i.createElement("div",{onClick:d,"data-testid":g,id:"cover-"+t,className:(0,on.st)(on.classes.root,{transparentOverlay:!s},h)},s&&i.createElement(nn,n()({id:"img_"+t},s,{containerId:t,displayMode:"fill",alt:u||"",name:""})),i.createElement(an,{title:r,showTitle:o,translations:p}))},un=o(67740),cn=o(37800),dn=o.n(cn);const hn=["data","aria"],pn=["style","class","dir","wix-comp","role","tabindex","focus","start"],fn=["href","dataquery","id","rel","target"],_n=["color","background-color","font-size","font-family","font-style","text-decoration","writing-mode","text-orientation","line-height","text-shadow","direction","position","z-index","top","left","overflow","overflow-x","overflow-y"];const mn=function(){const e={...cn.whiteList,strike:[],hatul:[],wline:[],object:[]};return e.a&&e.a.push(...fn),Object.keys(e).forEach((t=>{e[t]||(e[t]=[]),e[t].push(...pn)})),e}(),vn=_n.reduce(((e,t)=>(e[t]=!0,e)),{});function yn(e){return dn()(e,{whiteList:mn,stripIgnoreTagBody:["script","style"],stripBlankChar:!0,css:{whiteList:{...(0,cn.getDefaultCSSWhiteList)(),...vn}},safeAttrValue:function(e,t,n,i){const o=function(e,t,n,i){return"a"===e&&"href"===t&&n.startsWith("wix:document")?n:(0,cn.safeAttrValue)(e,t,n,i)}(e,t,n,i);return o||""},onIgnoreTagAttr(e,t,n){return hn.some((e=>t.startsWith(e)))?`${t}="${n}"`:""},onIgnoreTag(){return""}})}const gn=e=>{e.showMainUI(),e.getElement().tabIndex=0},En=e=>{e.hideMainUI(),e.getElement().tabIndex=-1},bn=()=>{},wn=(e,t)=>{const{id:o,src:r,showTitle:s,title:a,poster:l,hideOverlay:u,playing:c,muted:h,preload:p="none",animatePoster:f,controls:_,loop:g,texts:b={},hideMainUI:w=!1,description:T,translations:S,isMobileView:P,isMobile:I,onReady:O=bn,onDuration:C=bn,onProgress:L=bn,onPlay:A=bn,onPause:k=bn,onEnded:M=bn,onFirstPlay:D=bn,onFirstEnded:N=bn,onInit:x=bn}=e,R=i.useRef(null),[B,F]=(e=>{const[t,n,i]=d();return v((()=>(i((0,oe.Ue)(e)),()=>{const e=n();null==e.destroy||e.destroy()}))),[t,n]})({src:r,autoplay:Boolean(c),playsinline:!0,muted:h,fillAllSpace:!0,title:a?yn(a):a,preload:l?p:"metadata",loop:g,texts:b,hideOverlay:!0,hideMainUI:w,preventContextMenu:!0}),[$,U]=i.useState(!1),V=()=>U(!0),j=()=>U(!1),[H,G]=i.useState(!1),Y=i.useRef(!1),W=i.useRef(!1),z=i.useRef(!1),[K,q]=i.useState(!1),[Q,X]=i.useState(!1);v((()=>{B().then((e=>{if(En(e),(P||I)&&!un.isIOS(window)){const t=e.getElement(),n=t.querySelector("video");t.addEventListener("click",(()=>{null!=n&&n.paused?e.play():e.pause()}))}s||e.hideTitle(),e.attachToElement(R.current),((e,t,n,i,o,r)=>{let{controls:s,onReady:a,onDuration:l,onFirstPlay:u,onPlay:c,onPause:d,onFirstEnded:h,onEnded:p,onProgress:f,onFocus:_,onBlur:m}=t;e.on(se.default.PLAY_REQUESTED,(()=>{s&&gn(e),n(!0)})),e.on(se.default.METADATA_LOADED,(()=>{null==a||a(),null==l||l(e.getDuration())})),e.on(ae.default.FOCUS_ENTER_ON_PLAYER,(()=>{null==_||_()})),e.on(ae.default.FOCUS_LEAVE_ON_PLAYER,(()=>{null==m||m()})),e.on(se.default.PLAYING,(()=>{n(!0),o.current||(o.current=!0,null==u||u()),i.current=!0,null==c||c()})),e.on(se.default.PAUSED,(()=>{i.current=!1,null==d||d()})),e.on(se.default.ENDED,(()=>{n(!1),r.current||(r.current=!0,null==h||h()),i.current=!1,null==p||p()})),e.on(re.default.CURRENT_TIME_UPDATED,(e=>{null==f||f(e)}))})(e,{controls:_,onReady:O,onDuration:C,onFirstPlay:D,onPlay:A,onPause:k,onFirstEnded:N,onEnded:M,onProgress:L,onFocus:V,onBlur:j},G,Y,W,z),x(e,"playable")})).catch((e=>{throw e}))})),((e,t,n,i)=>{let{src:o,playing:r,muted:s,volume:a,title:l,preload:u,showTitle:c,controls:d}=e;y(o,(async()=>{n.current=!1,i.current=!1,(await t()).setSrc(o)})),y(r,(async()=>r?(await t()).play():(await t()).pause())),y(s,(async()=>s?(await t()).mute():(await t()).unmute())),y(a,(async()=>(await t()).setVolume(a))),y(l,(async()=>(await t()).setTitle(l))),y(u,(async()=>(await t()).setPreload(u))),y(c,(async()=>c?(await t()).showTitle():(await t()).hideTitle())),y(d,(async()=>d?gn(await t()):En(await t())))})({src:r,playing:c,muted:h,title:a,loop:g,preload:p,showTitle:s,controls:_},B,W,z),i.useImperativeHandle(t,(()=>((e,t,n)=>{const i={play:()=>new Promise((async t=>{const n=await e();n.once(se.default.PLAYING,t),n.play()})),pause:()=>new Promise((async t=>{const n=await e();n.once(se.default.PAUSED,t),n.pause()})),togglePlay:()=>n.current?i.pause():i.play(),stop:async()=>(await e()).reset(),getDuration:async()=>{const e=t();return e&&e.getDuration()||0},getCurrentTime:async()=>{const e=t();return e&&e.getCurrentTime()||0},seekTo:async t=>(await e()).seekTo(t),setVolume:async t=>(await e()).setVolume(t),getVolume:async()=>{const e=t();return e&&e.getVolume()||0},isMuted:async()=>{const e=t();return!e||e.isMuted},isPlaying:()=>n.current,mute:async()=>(await e()).mute(),unMute:async()=>(await e()).unmute()};return i})(B,F,Y)));const Z=i.useCallback((async()=>{(await B()).play(),q(!0)}),[B]);return i.createElement(i.Fragment,null,i.createElement("div",{ref:R,"data-player-name":"Playable","data-testid":E,className:m.classes.playerContainer}),l&&"fade"===f&&!Q&&i.createElement(ie,{in:K,timeout:1600,classNames:{enter:m.classes.fadeEnter,enterActive:m.classes.fadeEnterActive},onEntered:()=>{X(!0)}},i.createElement("div",{className:m.classes.secondPoster},i.createElement(nn,n()({id:"poster_"+o},l,{containerId:o,displayMode:"fill",alt:T||"",name:""})))),i.createElement(ln,{id:o,showTitle:s,title:a,poster:l,hideOverlay:u,playing:c,description:T,hasBeenPlayed:H,onPlay:Z,translations:S,className:(0,m.st)(m.classes.cover,{isMobileView:P,playerFocused:$})}))};var Tn=i.forwardRef(wn); /*! @vimeo/player v2.20.1 | (c) 2023 Vimeo | MIT License | https://github.com/vimeo/player.js */ function Sn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Pn(e){for(var t=1;t=0;--o){var r=this.tryEntries[o],s=r.completion;if("root"===r.tryLoc)return i("end");if(r.tryLoc<=this.prev){var a=n.call(r,"catchLoc"),l=n.call(r,"finallyLoc");if(a&&l){if(this.prev=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:I(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function On(e,t,n,i,o,r,s){try{var a=e[r](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(i,o)}function Cn(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var r=e.apply(t,n);function s(e){On(r,i,o,s,a,"next",e)}function a(e){On(r,i,o,s,a,"throw",e)}s(void 0)}))}}function Ln(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function An(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=t.id,i=t.url,o=n||i;if(!o)throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");if(e=o,!isNaN(parseFloat(e))&&isFinite(e)&&Math.floor(e)==e)return"https://vimeo.com/".concat(o);if(Hn(o))return o.replace("http:","https:");if(n)throw new TypeError("\u201c".concat(n,"\u201d is not a valid video id."));throw new TypeError("\u201c".concat(o,"\u201d is not a vimeo.com url."))}var Wn=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"addEventListener",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"removeEventListener",r="string"==typeof t?[t]:t;return r.forEach((function(t){e[i](t,n)})),{cancel:function(){return r.forEach((function(t){return e[o](t,n)}))}}},zn=void 0!==Array.prototype.indexOf,Kn="undefined"!=typeof window&&void 0!==window.postMessage;if(!(Vn||zn&&Kn))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var qn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==o.g?o.g:"undefined"!=typeof self?self:{}; /*! * weakmap-polyfill v2.0.4 - ECMAScript6 WeakMap polyfill * https://github.com/polygonplanet/weakmap-polyfill * Copyright (c) 2015-2021 polygonplanet * @license MIT */ !function(e){if(!e.WeakMap){var t=Object.prototype.hasOwnProperty,n=Object.defineProperty&&function(){try{return 1===Object.defineProperty({},"x",{value:1}).x}catch(e){}}(),i=function(e,t,i){n?Object.defineProperty(e,t,{configurable:!0,writable:!0,value:i}):e[t]=i};e.WeakMap=function(){function e(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(i(this,"_id","_WeakMap"+"_"+r()+"."+r()),arguments.length>0)throw new TypeError("WeakMap iterable is not supported")}function n(e,n){if(!o(e)||!t.call(e,"_id"))throw new TypeError(n+" method called on incompatible receiver "+typeof e)}function r(){return Math.random().toString().substring(2)}return i(e.prototype,"delete",(function(e){if(n(this,"delete"),!o(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)&&(delete e[this._id],!0)})),i(e.prototype,"get",(function(e){if(n(this,"get"),o(e)){var t=e[this._id];return t&&t[0]===e?t[1]:void 0}})),i(e.prototype,"has",(function(e){if(n(this,"has"),!o(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)})),i(e.prototype,"set",(function(e,t){if(n(this,"set"),!o(e))throw new TypeError("Invalid value used as weak map key");var r=e[this._id];return r&&r[0]===e?(r[1]=t,this):(i(e,this._id,[e,t]),this)})),i(e,"_polyfill",!0),e}()}function o(e){return Object(e)===e}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:qn);var Qn=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){ /*! Native Promise Only v0.8.1 (c) Kyle Simpson MIT License: http://getify.mit-license.org */ var t,n,i;i=function(){var e,t,n,i=Object.prototype.toString,o="undefined"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,n,i){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==i})}}catch(t){e=function(e,t,n){return e[t]=n,e}}function r(e,i){n.add(e,i),t||(t=o(n.drain))}function s(e){var t,n=typeof e;return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t&&t}function a(){for(var e=0;e0&&r(a,n))}catch(e){c.call(new h(n),e)}}}function c(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&r(a,t))}function d(e,t,n,i){for(var o=0;o=8&&o<10&&(i=JSON.stringify(i)),e.element.contentWindow.postMessage(i,e.origin)}}function ii(e,t){var n,i=[];if((t=ti(t)).event){if("error"===t.event)Jn(e,t.data.method).forEach((function(n){var i=new Error(t.data.message);i.name=t.data.name,n.reject(i),ei(e,t.data.method,n)}));i=Jn(e,"event:".concat(t.event)),n=t.data}else if(t.method){var o=function(e,t){var n=Jn(e,t);if(n.length<1)return!1;var i=n.shift();return ei(e,t,i),i}(e,t.method);o&&(i.push(o),n=t.value)}i.forEach((function(t){try{if("function"==typeof t)return void t.call(e,n);t.resolve(n)}catch(e){}}))}var oi=["autopause","autoplay","background","byline","color","colors","controls","dnt","height","id","interactive_params","keyboard","loop","maxheight","maxwidth","muted","playsinline","portrait","responsive","speed","texttrack","title","transparent","url","width"];function ri(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return oi.reduce((function(t,n){var i=e.getAttribute("data-vimeo-".concat(n));return(i||""===i)&&(t[n]=""===i?1:i),t}),t)}function si(e,t){var n=e.html;if(!t)throw new TypeError("An element must be provided");if(null!==t.getAttribute("data-vimeo-initialized"))return t.querySelector("iframe");var i=document.createElement("div");return i.innerHTML=n,t.appendChild(i.firstChild),t.setAttribute("data-vimeo-initialized","true"),t.querySelector("iframe")}function ai(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return new Promise((function(i,o){if(!Hn(e))throw new TypeError("\u201c".concat(e,"\u201d is not a vimeo.com url."));var r="https://vimeo.com/api/oembed.json?url=".concat(encodeURIComponent(e));for(var s in t)t.hasOwnProperty(s)&&(r+="&".concat(s,"=").concat(encodeURIComponent(t[s])));var a="XDomainRequest"in window?new XDomainRequest:new XMLHttpRequest;a.open("GET",r,!0),a.onload=function(){if(404!==a.status)if(403!==a.status)try{var t=JSON.parse(a.responseText);if(403===t.domain_status_code)return si(t,n),void o(new Error("\u201c".concat(e,"\u201d is not embeddable.")));i(t)}catch(e){o(e)}else o(new Error("\u201c".concat(e,"\u201d is not embeddable.")));else o(new Error("\u201c".concat(e,"\u201d was not found.")))},a.onerror=function(){var e=a.status?" (".concat(a.status,")"):"";o(new Error("There was an error fetching the embed code from Vimeo".concat(e,".")))},a.send()}))}var li={role:"viewer",autoPlayMuted:!0,allowedDrift:.3,maxAllowedDrift:1,minCheckInterval:.1,maxRateAdjustment:.2,maxTimeToCatchUp:1},ui=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nn(e,t)}(r,e);var t,n,i,o=$n(r);function r(e,t){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;return Ln(this,r),Mn(Fn(n=o.call(this)),"logger",void 0),Mn(Fn(n),"speedAdjustment",0),Mn(Fn(n),"adjustSpeed",function(){var e=Cn(In().mark((function e(t,i){var o;return In().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.speedAdjustment!==i){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,t.getPlaybackRate();case 4:return e.t0=e.sent,e.t1=n.speedAdjustment,e.t2=e.t0-e.t1,e.t3=i,o=e.t2+e.t3,n.log("New playbackRate: ".concat(o)),e.next=12,t.setPlaybackRate(o);case 12:n.speedAdjustment=i;case 13:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),n.logger=s,n.init(t,e,Pn(Pn({},li),i)),n}return kn(r,[{key:"disconnect",value:function(){this.dispatchEvent(new Event("disconnect"))}},{key:"init",value:(i=Cn(In().mark((function e(t,n,i){var o,r,s,a=this;return In().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.waitForTOReadyState(t,"open");case 2:if("viewer"!==i.role){e.next=10;break}return e.next=5,this.updatePlayer(t,n,i);case 5:o=Wn(t,"change",(function(){return a.updatePlayer(t,n,i)})),r=this.maintainPlaybackPosition(t,n,i),this.addEventListener("disconnect",(function(){r.cancel(),o.cancel()})),e.next=14;break;case 10:return e.next=12,this.updateTimingObject(t,n);case 12:s=Wn(n,["seeked","play","pause","ratechange"],(function(){return a.updateTimingObject(t,n)}),"on","off"),this.addEventListener("disconnect",(function(){return s.cancel()}));case 14:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return i.apply(this,arguments)})},{key:"updateTimingObject",value:(n=Cn(In().mark((function e(t,n){return In().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=t,e.next=3,n.getCurrentTime();case 3:return e.t1=e.sent,e.next=6,n.getPaused();case 6:if(!e.sent){e.next=10;break}e.t2=0,e.next=13;break;case 10:return e.next=12,n.getPlaybackRate();case 12:e.t2=e.sent;case 13:e.t3=e.t2,e.t4={position:e.t1,velocity:e.t3},e.t0.update.call(e.t0,e.t4);case 16:case"end":return e.stop()}}),e)}))),function(e,t){return n.apply(this,arguments)})},{key:"updatePlayer",value:(t=Cn(In().mark((function e(t,n,i){var o,r,s;return In().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.query(),r=o.position,s=o.velocity,"number"==typeof r&&n.setCurrentTime(r),"number"!=typeof s){e.next=25;break}if(0!==s){e.next=11;break}return e.next=6,n.getPaused();case 6:if(e.t0=e.sent,!1!==e.t0){e.next=9;break}n.pause();case 9:e.next=25;break;case 11:if(!(s>0)){e.next=25;break}return e.next=14,n.getPaused();case 14:if(e.t1=e.sent,!0!==e.t1){e.next=19;break}return e.next=18,n.play().catch(function(){var e=Cn(In().mark((function e(t){return In().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("NotAllowedError"!==t.name||!i.autoPlayMuted){e.next=5;break}return e.next=3,n.setMuted(!0);case 3:return e.next=5,n.play().catch((function(e){return console.error("Couldn't play the video from TimingSrcConnector. Error:",e)}));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 18:this.updatePlayer(t,n,i);case 19:return e.next=21,n.getPlaybackRate();case 21:if(e.t2=e.sent,e.t3=s,e.t2===e.t3){e.next=25;break}n.setPlaybackRate(s);case 25:case"end":return e.stop()}}),e,this)}))),function(e,n,i){return t.apply(this,arguments)})},{key:"maintainPlaybackPosition",value:function(e,t,n){var i=this,o=n.allowedDrift,r=n.maxAllowedDrift,s=n.minCheckInterval,a=n.maxRateAdjustment,l=n.maxTimeToCatchUp,u=1e3*Math.min(l,Math.max(s,r)),c=function(){var n=Cn(In().mark((function n(){var s,u,c,d,h;return In().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.t0=0===e.query().velocity,n.t0){n.next=6;break}return n.next=4,t.getPaused();case 4:n.t1=n.sent,n.t0=!0===n.t1;case 6:if(!n.t0){n.next=8;break}return n.abrupt("return");case 8:return n.t2=e.query().position,n.next=11,t.getCurrentTime();case 11:if(n.t3=n.sent,s=n.t2-n.t3,u=Math.abs(s),i.log("Drift: ".concat(s)),!(u>r)){n.next=22;break}return n.next=18,i.adjustSpeed(t,0);case 18:t.setCurrentTime(e.query().position),i.log("Resync by currentTime"),n.next=29;break;case 22:if(!(u>o)){n.next=29;break}return h=(c=u/l)<(d=a)?(d-c)/2:d,n.next=28,i.adjustSpeed(t,h*Math.sign(s));case 28:i.log("Resync by playbackRate");case 29:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}(),d=setInterval((function(){return c()}),u);return{cancel:function(){return clearInterval(d)}}}},{key:"log",value:function(e){var t;null===(t=this.logger)||void 0===t||t.call(this,"TimingSrcConnector: ".concat(e))}},{key:"waitForTOReadyState",value:function(e,t){return new Promise((function(n){!function i(){e.readyState===t?n():e.addEventListener("readystatechange",i,{once:!0})}()}))}}]),r}(Bn(EventTarget)),ci=new WeakMap,di=new WeakMap,hi={},pi=function(){function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ln(this,e),window.jQuery&&t instanceof jQuery&&(t.length>1&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),t=t[0]),"undefined"!=typeof document&&"string"==typeof t&&(t=document.getElementById(t)),!function(e){return Boolean(e&&1===e.nodeType&&"nodeName"in e&&e.ownerDocument&&e.ownerDocument.defaultView)}(t))throw new TypeError("You must pass either a valid element or a valid id.");if("IFRAME"!==t.nodeName){var o=t.querySelector("iframe");o&&(t=o)}if("IFRAME"===t.nodeName&&!Hn(t.getAttribute("src")||""))throw new Error("The player element passed isn\u2019t a Vimeo embed.");if(ci.has(t))return ci.get(t);this._window=t.ownerDocument.defaultView,this.element=t,this.origin="*";var r=new Qn((function(e,o){if(n._onMessage=function(t){if(Hn(t.origin)&&n.element.contentWindow===t.source){"*"===n.origin&&(n.origin=t.origin);var i=ti(t.data);if(i&&"error"===i.event&&i.data&&"ready"===i.data.method){var r=new Error(i.data.message);return r.name=i.data.name,void o(r)}var s=i&&"ready"===i.event,a=i&&"ping"===i.method;if(s||a)return n.element.setAttribute("data-ready","true"),void e();ii(n,i)}},n._window.addEventListener("message",n._onMessage),"IFRAME"!==n.element.nodeName){var r=ri(t,i);ai(Yn(r),r,t).then((function(e){var i,o,r,s=si(e,t);return n.element=s,n._originalElement=t,i=t,o=s,r=Xn.get(i),Xn.set(o,r),Xn.delete(i),ci.set(n.element,n),e})).catch(o)}}));if(di.set(this,r),ci.set(this.element,this),"IFRAME"===this.element.nodeName&&ni(this,"ping"),hi.isEnabled){var s=function(){return hi.exit()};this.fullscreenchangeHandler=function(){hi.isFullscreen?Zn(n,"event:exitFullscreen",s):ei(n,"event:exitFullscreen",s),n.ready().then((function(){ni(n,"fullscreenchange",hi.isFullscreen)}))},hi.on("fullscreenchange",this.fullscreenchangeHandler)}return this}var t;return kn(e,[{key:"callMethod",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Qn((function(i,o){return t.ready().then((function(){Zn(t,e,{resolve:i,reject:o}),ni(t,e,n)})).catch(o)}))}},{key:"get",value:function(e){var t=this;return new Qn((function(n,i){return e=jn(e,"get"),t.ready().then((function(){Zn(t,e,{resolve:n,reject:i}),ni(t,e)})).catch(i)}))}},{key:"set",value:function(e,t){var n=this;return new Qn((function(i,o){if(e=jn(e,"set"),null==t)throw new TypeError("There must be a value to set.");return n.ready().then((function(){Zn(n,e,{resolve:i,reject:o}),ni(n,e,t)})).catch(o)}))}},{key:"on",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(!t)throw new TypeError("You must pass a callback function.");if("function"!=typeof t)throw new TypeError("The callback must be a function.");0===Jn(this,"event:".concat(e)).length&&this.callMethod("addEventListener",e).catch((function(){})),Zn(this,"event:".concat(e),t)}},{key:"off",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(t&&"function"!=typeof t)throw new TypeError("The callback must be a function.");ei(this,"event:".concat(e),t)&&this.callMethod("removeEventListener",e).catch((function(e){}))}},{key:"loadVideo",value:function(e){return this.callMethod("loadVideo",e)}},{key:"ready",value:function(){var e=di.get(this)||new Qn((function(e,t){t(new Error("Unknown player. Probably unloaded."))}));return Qn.resolve(e)}},{key:"addCuePoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.callMethod("addCuePoint",{time:e,data:t})}},{key:"removeCuePoint",value:function(e){return this.callMethod("removeCuePoint",e)}},{key:"enableTextTrack",value:function(e,t){if(!e)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:e,kind:t})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"requestFullscreen",value:function(){return hi.isEnabled?hi.request(this.element):this.callMethod("requestFullscreen")}},{key:"exitFullscreen",value:function(){return hi.isEnabled?hi.exit():this.callMethod("exitFullscreen")}},{key:"getFullscreen",value:function(){return hi.isEnabled?Qn.resolve(hi.isFullscreen):this.get("fullscreen")}},{key:"requestPictureInPicture",value:function(){return this.callMethod("requestPictureInPicture")}},{key:"exitPictureInPicture",value:function(){return this.callMethod("exitPictureInPicture")}},{key:"getPictureInPicture",value:function(){return this.get("pictureInPicture")}},{key:"remotePlaybackPrompt",value:function(){return this.callMethod("remotePlaybackPrompt")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"destroy",value:function(){var e=this;return new Qn((function(t){if(di.delete(e),ci.delete(e.element),e._originalElement&&(ci.delete(e._originalElement),e._originalElement.removeAttribute("data-vimeo-initialized")),e.element&&"IFRAME"===e.element.nodeName&&e.element.parentNode&&(e.element.parentNode.parentNode&&e._originalElement&&e._originalElement!==e.element.parentNode?e.element.parentNode.parentNode.removeChild(e.element.parentNode):e.element.parentNode.removeChild(e.element)),e.element&&"DIV"===e.element.nodeName&&e.element.parentNode){e.element.removeAttribute("data-vimeo-initialized");var n=e.element.querySelector("iframe");n&&n.parentNode&&(n.parentNode.parentNode&&e._originalElement&&e._originalElement!==n.parentNode?n.parentNode.parentNode.removeChild(n.parentNode):n.parentNode.removeChild(n))}e._window.removeEventListener("message",e._onMessage),hi.isEnabled&&hi.off("fullscreenchange",e.fullscreenchangeHandler),t()}))}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(e){return this.set("autopause",e)}},{key:"getBuffered",value:function(){return this.get("buffered")}},{key:"getCameraProps",value:function(){return this.get("cameraProps")}},{key:"setCameraProps",value:function(e){return this.set("cameraProps",e)}},{key:"getChapters",value:function(){return this.get("chapters")}},{key:"getCurrentChapter",value:function(){return this.get("currentChapter")}},{key:"getColor",value:function(){return this.get("color")}},{key:"getColors",value:function(){return Qn.all([this.get("colorOne"),this.get("colorTwo"),this.get("colorThree"),this.get("colorFour")])}},{key:"setColor",value:function(e){return this.set("color",e)}},{key:"setColors",value:function(e){if(!Array.isArray(e))return new Qn((function(e,t){return t(new TypeError("Argument must be an array."))}));var t=new Qn((function(e){return e(null)})),n=[e[0]?this.set("colorOne",e[0]):t,e[1]?this.set("colorTwo",e[1]):t,e[2]?this.set("colorThree",e[2]):t,e[3]?this.set("colorFour",e[3]):t];return Qn.all(n)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(e){return this.set("currentTime",e)}},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(e){return this.set("loop",e)}},{key:"setMuted",value:function(e){return this.set("muted",e)}},{key:"getMuted",value:function(){return this.get("muted")}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(e){return this.set("playbackRate",e)}},{key:"getPlayed",value:function(){return this.get("played")}},{key:"getQualities",value:function(){return this.get("qualities")}},{key:"getQuality",value:function(){return this.get("quality")}},{key:"setQuality",value:function(e){return this.set("quality",e)}},{key:"getRemotePlaybackAvailability",value:function(){return this.get("remotePlaybackAvailability")}},{key:"getRemotePlaybackState",value:function(){return this.get("remotePlaybackState")}},{key:"getSeekable",value:function(){return this.get("seekable")}},{key:"getSeeking",value:function(){return this.get("seeking")}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(e){return this.set("volume",e)}},{key:"setTimingSrc",value:(t=Cn(In().mark((function e(t,n){var i,o=this;return In().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw new TypeError("A Timing Object must be provided.");case 2:return e.next=4,this.ready();case 4:return i=new ui(this,t,n),ni(this,"notifyTimingObjectConnect"),i.addEventListener("disconnect",(function(){return ni(o,"notifyTimingObjectDisconnect")})),e.abrupt("return",i);case 8:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})}]),e}();Vn||(hi=function(){var e=function(){for(var e,t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n=0,i=t.length,o={};n0&&void 0!==arguments[0]?arguments[0]:document,t=[].slice.call(e.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")),n=function(e){"console"in window&&console.error&&console.error("There was an error creating an embed: ".concat(e))};t.forEach((function(e){try{if(null!==e.getAttribute("data-vimeo-defer"))return;var t=ri(e);ai(Yn(t),t,e).then((function(t){return si(t,e)})).catch(n)}catch(e){n(e)}}))}(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;window.VimeoPlayerResizeEmbeds_||(window.VimeoPlayerResizeEmbeds_=!0,window.addEventListener("message",(function(t){if(Hn(t.origin)&&t.data&&"spacechange"===t.data.event)for(var n=e.querySelectorAll("iframe"),i=0;i0&&void 0!==arguments[0]?arguments[0]:document;window.VimeoSeoMetadataAppended||(window.VimeoSeoMetadataAppended=!0,window.addEventListener("message",(function(t){if(Hn(t.origin)){var n=ti(t.data);if(n&&"ready"===n.event)for(var i=e.querySelectorAll("iframe"),o=0;o0&&void 0!==arguments[0]?arguments[0]:document;if(!window.VimeoCheckedUrlTimeParam){window.VimeoCheckedUrlTimeParam=!0;var t=function(e){"console"in window&&console.error&&console.error("There was an error getting video Id: ".concat(e))};window.addEventListener("message",(function(n){if(Hn(n.origin)){var i=ti(n.data);if(i&&"ready"===i.event)for(var o=e.querySelectorAll("iframe"),r=function(){var e=o[s],i=e.contentWindow===n.source;if(Gn(e.src)&&i){var r=new pi(e);r.getVideoId().then((function(e){var t=new RegExp("[?&]vimeo_t_".concat(e,"=([^&#]*)")).exec(window.location.href);if(t&&t[1]){var n=decodeURI(t[1]);r.setCurrentTime(n)}})).catch(t)}},s=0;sPromise.resolve({Player:fi})};var mi=e=>{let{id:t,showTitle:n,title:o,hasBeenPlayed:r,onPlay:s,onPause:a,className:l,translations:u}=e;return i.createElement("div",{onClick:r?a:s,"data-testid":g,id:"cover-"+t,className:(0,on.st)(on.classes.root,{transparentOverlay:!0},l)},!r&&i.createElement(an,{title:o,showTitle:n,translations:u}))};const vi="play",yi="pause",gi="ended",Ei="volumechange",bi="timeupdate";const wi=(e,t)=>{const{id:n,src:o,playing:r,muted:s,loop:a,showTitle:l,controls:u=!0,translations:c,volume:h=0,onReady:p,onInit:f,onDuration:_,onProgress:g,onPlay:E,onPause:b,onEnded:w,onFirstPlay:T,onFirstEnded:S,onError:I}=e,[C,L]=i.useState(!!r),[A,k]=i.useState(""),M=i.useRef(null),D=i.useRef(0),N=i.useRef(0),x=i.useRef(h),R=i.useRef(!1),B=i.useRef(!1),F=((e,t)=>{const[n,,i]=d();return v((()=>(O(_i).then((n=>{i(new n.Player(e.current,t))})).catch((e=>{throw e})),()=>{n().then((e=>e.destroy())).catch((e=>{throw e}))}))),n})(M,{url:o,autoplay:r,muted:s,loop:a,controls:u,autopause:!1,title:l});v((()=>{F().then((e=>{e.ready().then((()=>{null==p||p(),e.getVideoTitle().then((e=>{k(e)})).catch((e=>{throw e})),e.getDuration().then((e=>{D.current=e,null==_||_(e)})).catch((e=>{throw e}))})).catch((e=>{throw e})),function(e,t,n,i,o,r,s,a){let{controls:l,loop:u}=t,{onProgress:c,onPlay:d,onPause:h,onEnded:p,onFirstPlay:f,onFirstEnded:_,onError:m}=n;e.on(vi,(()=>{s.current||(s.current=!0,null==f||f()),a(!0),null==d||d()})),e.on(yi,(()=>{a(!1),null==h||h()})),e.on(gi,(()=>{r.current||(r.current=!0,null==_||_()),a(!1),null==p||p()})),e.on(Ei,(e=>{let{volume:t}=e;o.current=100*t})),e.on(bi,(t=>{let{seconds:n,duration:o}=t;i.current=n,null==c||c(n),!l&&!u&&o-n<.5&&(e.setCurrentTime(0),e.pause())})),m&&e.on("error",m)}(e,{controls:u,loop:a},{onProgress:g,onPlay:E,onPause:b,onEnded:w,onFirstPlay:T,onFirstEnded:S,onError:I},N,x,B,R,L),null==f||f(e,"vimeo")})).catch((e=>{throw e}))})),((e,t,n,i)=>{let{src:o,playing:r,muted:s,volume:a}=e;y(o,(()=>{t.current=!1,n.current=!1})),y(r,(()=>i().then((e=>r?e.play():e.pause())))),y(s,(()=>i().then((e=>e.setVolume(s?0:1))))),y(a,(()=>i().then((e=>e.setVolume(a/100)))))})({src:o,playing:r,muted:s,volume:h},R,B,F),i.useImperativeHandle(t,(()=>((e,t,n,i,o)=>{const r={play:()=>e().then((e=>e.play())),pause:()=>e().then((e=>e.pause())),togglePlay:()=>t?r.pause():r.play(),getDuration:async()=>n.current,getCurrentTime:async()=>i.current,seekTo:t=>e().then((e=>e.setCurrentTime(t))),getVolume:async()=>o.current,setVolume:t=>e().then((e=>e.setVolume(t/100))),isMuted:async()=>0===o.current,isPlaying:()=>t,mute:()=>e().then((e=>e.setVolume(0))),unMute:()=>e().then((e=>e.setVolume(1)))};return r})(F,C,D,N,x)));const $=i.useCallback((async()=>{(await F()).play()}),[F]),U=i.useCallback((async()=>{(await F()).pause()}),[F]);return i.createElement(i.Fragment,null,i.createElement("div",{ref:M,"data-player-name":"Vimeo","data-testid":P,className:en(m.classes.playerContainer,m.classes.vimeoContainer)}),!u&&i.createElement(mi,{id:n,showTitle:l,title:A,hasBeenPlayed:C,onPlay:$,onPause:U,translations:c,className:(0,m.st)(m.classes.cover,{isMobileView:e.isMobileView})}))};var Ti=i.forwardRef(wi);function Si(){return window.YT}var Pi={name:"youtube",loader:()=>Boolean(Si())?Promise.resolve(Si()):new Promise((e=>{const t=function(){const e=window.document.createElement("script");return e.defer=!0,e.async=!0,e.src="https://www.youtube.com/iframe_api",e}(),n=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{n&&n(),e(Si())},window.document.body.insertBefore(t,window.document.body.firstChild)}))};const Ii=/(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|live\/|watch\?v=|watch\?.+&v=))((\w|-){11})/,Oi=e=>new Promise((t=>{const n=()=>{e.playVideo?t(e):setTimeout(n,50)};n()}));function Ci(e,t,n,i,o,r,s){let{onPlay:a,onPause:l,onEnded:u,onProgress:c,onFirstPlay:d,onFirstEnded:h}=n;return i.subscribe((()=>{null==c||c(e().getCurrentTime()||0)})),e=>{let{data:n}=e;const{PLAYING:c,PAUSED:p,ENDED:f}=t();n===c&&(s.current||(s.current=!0,null==d||d()),o.current=!0,null==a||a(),i.update()),n===p&&(o.current=!1,null==l||l(),i.stop()),n===f&&(r.current||(r.current=!0,null==h||h()),o.current=!1,null==u||u(),i.stop())}}const Li=(e,t)=>{const{src:n,playing:o,muted:r,loop:s,controls:a,volume:l=0,onReady:u,onInit:c,onDuration:h,onProgress:p,onPlay:f,onPause:_,onEnded:g,onFirstPlay:E,onFirstEnded:b,onError:w}=e,S=i.useRef(null),P=i.useRef(null),I=i.useRef(!1),C=i.useRef(!1),L=i.useRef(!1),A=M(),k=(e=>e.match(Ii)[1])(n),[D,N]=((e,t,n)=>{const[i,o,r]=d();return v((()=>{O(Pi).then((i=>{t.current=i,r(new i.Player(e.current,n))})).catch((e=>{throw e}))})),[()=>i().then(Oi),o]})(P,S,{width:"100%",height:"100%",videoId:k,playerVars:{autoplay:o?1:0,mute:r?1:0,controls:a?1:0,loop:s?1:0,origin:"undefined"!=typeof window&&window.location&&window.location.origin,playsinline:1,...s&&{playlist:k}},events:{onReady:()=>{null==u||u(),null==h||h(N().getDuration())},onStateChange:Ci((()=>N()),(()=>S.current.PlayerState),{onPlay:f,onPause:_,onEnded:g,onProgress:p,onFirstPlay:E,onFirstEnded:b},A,I,L,C),onError:w}});return v((()=>{D().then((e=>{null==c||c(e,"youtube")})).catch((e=>{throw e}))})),((e,t,n,i)=>{let{src:o,playing:r,muted:s,volume:a}=e;y(o,(()=>{t.current=!1,n.current=!1})),y(r,(()=>i().then((e=>r?e.playVideo():e.pauseVideo())))),y(s,(()=>i().then((e=>s?e.mute():e.unMute())))),y(a,(()=>i().then((e=>e.setVolume(a)))))})({src:n,playing:o,muted:r,volume:l},C,L,D),i.useImperativeHandle(t,(()=>((e,t,n)=>{const i={play:()=>e().then((e=>{e.playVideo()})),pause:()=>e().then((e=>{e.pauseVideo()})),togglePlay:()=>n.current?i.pause():i.play(),stop:()=>e().then((e=>{e.stopVideo()})),getDuration:async()=>{const e=t();return e&&e.getDuration?e.getDuration():0},getCurrentTime:async()=>{const e=t();return e&&e.getCurrentTime?e.getCurrentTime():0},seekTo:t=>e().then((e=>{e.seekTo(t)})),getVolume:async()=>{const e=t();return e&&e.getVolume?e.getVolume():0},setVolume:t=>e().then((e=>{e.setVolume(t)})),isMuted:async()=>{const e=t();return!e||!e.isMuted||e.isMuted()},isPlaying:()=>n.current,mute:()=>e().then((e=>{e.mute()})),unMute:()=>e().then((e=>{e.unMute()}))};return i})(D,N,I))),i.createElement("div",{className:m.classes.playerContainer,"data-player-name":"YouTube","data-testid":T},i.createElement("div",{ref:P}))};var Ai=i.forwardRef(Li);const ki="https://geo.dailymotion.com/libs/player.js";function Mi(){return window.dailymotion}var Di={name:"dailyMotion",loader:()=>Boolean(Mi())?Promise.resolve(Mi()):new Promise((e=>{const t=window.dmAsyncInit;window.dmAsyncInit=()=>{t&&t(),e(Mi())};const n=function(){const e=window.document.createElement("script");return e.defer=!0,e.async=!0,e.src=ki,e}();n.addEventListener("load",(()=>e(Mi()))),window.document.body.insertBefore(n,window.document.body.firstChild)}))};const Ni=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:\?.*)?$/;function xi(e,t,n,i,o,r){let{onReady:s,onPlay:a,onPause:l,onEnded:u,onDuration:c,onProgress:d,onFirstPlay:h,onFirstEnded:p,onError:f}=t;return n.subscribe((()=>{d&&e().getState().then((e=>d((null==e?void 0:e.videoTime)||0)))})),{apiready:()=>null==s?void 0:s(),durationChange:()=>{c&&e().getState().then((e=>c(e.videoDuration)))},playing:()=>{r.current||(r.current=!0,null==h||h()),i.current=!0,null==a||a(),n.update()},pause:()=>{i.current=!1,null==l||l(),n.stop()},video_end:()=>{o.current||(o.current=!0,null==p||p()),i.current=!1,null==u||u(),n.stop()},error:e=>f&&f(e)}}const Ri=(e,t)=>{const{id:n,src:o,playing:r,muted:s,controls:a,volume:l=0,onReady:u,onInit:c,onDuration:h,showTitle:p,onProgress:f,onPlay:_,onPause:g,onEnded:E,onFirstPlay:w,onFirstEnded:T,onError:S}=e,P=n+"-dailymotion",I=i.useRef(!1),C=i.useRef(!1),L=i.useRef(!1),A=M(),k=(e=>e.match(Ni)[1])(o),[D,N]=((e,t)=>{const[n,i,o]=d();return v((()=>{O(Di).then((n=>{o(n.createPlayer(e,t))})).catch((e=>{throw e}))})),[n,i]})(P,{width:"100%",height:"100%",video:k,player:r?"xsfha":"xsfh8",params:{controls:a,autoplay:r,mute:s,"ui-start-screen-info":p,origin:"undefined"!=typeof window&&window.location&&window.location.origin},events:xi((()=>N()),{onReady:u,onPlay:_,onPause:g,onEnded:E,onDuration:h,onProgress:f,onFirstPlay:w,onFirstEnded:T,onError:S},A,I,L,C)});return v((()=>{D().then((e=>{null==c||c(e,"dailymotion")})).catch((e=>{throw e}))})),((e,t,n,i)=>{let{src:o,playing:r,muted:s,volume:a}=e;y(o,(()=>{t.current=!1,n.current=!1})),y(r,(()=>i().then((e=>r?e.play():e.pause())))),y(s,(()=>i().then((e=>e.setMute(s))))),y(a,(()=>i().then((e=>e.setVolume(a/100)))))})({src:o,playing:r,muted:s,volume:l,controls:a},C,L,D),i.useImperativeHandle(t,(()=>((e,t,n)=>{const i={play:()=>e().then((e=>e.play())),pause:()=>e().then((e=>e.pause())),togglePlay:()=>n.current?i.pause():i.play(),getDuration:async()=>{var e;const n=await(null==(e=t())?void 0:e.getState());return n&&n.videoDuration||0},getCurrentTime:async()=>{var e;const n=await(null==(e=t())?void 0:e.getState());return n&&n.videoTime||0},seekTo:t=>e().then((e=>e.seek(t))),getVolume:async()=>{var e;const n=await(null==(e=t())?void 0:e.getState());return n?100*n.playerVolume:0},setVolume:t=>e().then((e=>e.setVolume(t/100))),isMuted:async()=>{var e;const n=await(null==(e=t())?void 0:e.getState());return!n||n.playerIsMuted},isPlaying:()=>n.current,mute:()=>e().then((e=>e.setMute(!0))),unMute:()=>e().then((e=>e.setMute(!1)))};return i})(D,N,I))),i.createElement("div",{className:m.classes.playerContainer,"data-player-name":"DailyMotion","data-testid":b},i.createElement("div",{id:P}))};function Bi(){return window.FB}var Fi={name:"facebook",loader:e=>Boolean(Bi())?Promise.resolve(Bi()):new Promise((t=>{const n=window.fbAsyncInit;window.fbAsyncInit=()=>{n&&n(),t(Bi())};const i=window.document.createDocumentFragment();i.appendChild(function(){const e=document.createElement("div");return e.id="fb-root",e.style.display="none",e}()),i.appendChild(function(e){let{language:t,appId:n,version:i}=e;const o=window.document.createElement("script");return o.defer=!0,o.async=!0,o.crossOrigin="anonymous",o.src="//connect.facebook.net/"+t+"/sdk.js#xfbml=1&appId="+n+"&version="+i,o}(e)),window.document.body.insertBefore(i,window.document.body.firstChild)}))};const $i="startedPlaying",Ui="paused",Vi="finishedPlaying",ji="error",Hi={appId:"",language:"en_US",version:"v2.4"},Gi=(e,t,n,i)=>{e.init({appId:"",xfbml:!0,version:"v2.5"}),e.Event.subscribe("xfbml.ready",(e=>{Yi({msg:e,setPlayer:t,config:n})})),e.Event.subscribe("iframeplugin:create",(()=>Wi(i)))},Yi=e=>{let{msg:t,setPlayer:n,config:i}=e;const{playerId:o}=i;"video"===t.type&&t.id===o&&n(t.instance)},Wi=e=>{if(!e.current)return;const t=e.current.querySelector("iframe");t&&t.setAttribute("allow","autoplay; encrypted-media")};const zi=(e,t)=>{const{src:n,playing:o,muted:r,volume:s=0,onInit:l,onProgress:u,controls:c,onError:h,onPlay:p,onPause:f,onFirstPlay:_,onFirstEnded:g,onEnded:E,isEditor:b}=e,w="facebook-"+e.id,T=i.useRef(!1),P=i.useRef(null),I=i.useRef(null),C=i.useRef(!1),L=i.useRef(!1),A=M(),[k,D]=i.useState({width:"0",height:"0"}),N=i.useCallback((()=>{P.current&&D({width:P.current.offsetWidth.toString(),height:P.current.offsetHeight.toString()})}),[]);i.useEffect((()=>{N()}),[b,N]);const x=i.useCallback(a((()=>{b&&N()}),100),[b]);(e=>{let{callback:t,ref:n,elem:o}=e;(0,i.useEffect)((()=>{const e=new ResizeObserver(t);return null!=n&&n.current&&e.observe(n.current),o&&e.observe(o),()=>{e.disconnect()}}),[n,o,t])})({ref:P,callback:x}),i.useEffect((()=>{O(Fi,Hi).then((e=>{P.current&&e.XFBML.parse(P.current)})).catch((e=>{throw e}))}),[k]);const[R,B]=((e,t)=>{const[n,i,o]=d();return v((()=>{const n=O(Fi,Hi);return n.then((n=>{Gi(n,o,t,e)})).catch((e=>{throw e})),()=>{n.then((e=>{e.Event.unsubscribe("xfbml.ready",Yi),e.Event.unsubscribe("iframeplugin:create",Wi)})).catch((e=>{throw e}))}})),[n,i]})(I,{playerId:w});return v((()=>{R().then((e=>{!function(e,t,n,i,o,r){let{onPlay:s,onPause:a,onFirstPlay:l,onFirstEnded:u,onEnded:c,onProgress:d,onError:h}=t;n.subscribe((()=>{null==d||d(e().getCurrentPosition()||0)})),e().subscribe($i,(()=>{o.current||(o.current=!0,null==l||l()),r.current=!0,null==s||s(),n.update()})),e().subscribe(Ui,(()=>{r.current=!1,null==a||a(),n.stop()})),e().subscribe(Vi,(()=>{i.current||(i.current=!0,null==u||u()),r.current=!1,null==c||c(),n.stop()})),h&&e().subscribe(ji,h)}((()=>B()),{onPlay:p,onPause:f,onFirstPlay:_,onFirstEnded:g,onEnded:E,onProgress:u,onError:h},A,L,C,T),r||e.unmute(),o&&e.play(),null==l||l(e,"facebook")})).catch((e=>{throw e}))})),((e,t,n,i)=>{let{src:o,playing:r,muted:s,volume:a}=e;y(o,(()=>{t.current=!1,n.current=!1})),y(r,(()=>i().then((e=>r?e.play():e.pause())))),y(s,(()=>i().then((e=>s?e.mute():e.unmute())))),y(a,(()=>i().then((e=>e.setVolume(a/100)))))})({src:n,playing:o,muted:r,volume:s},C,L,R),i.useImperativeHandle(t,(()=>((e,t,n)=>{const i={play:()=>e().then((e=>e.play())),pause:()=>e().then((e=>e.pause())),togglePlay:()=>n.current?i.pause():i.play(),getDuration:async()=>{const e=t();return e&&e.getDuration()||0},getCurrentTime:async()=>{const e=t();return e&&e.getCurrentPosition()||0},seekTo:t=>e().then((e=>e.seek(t))),getVolume:async()=>{const e=t();return e&&100*e.getVolume()||0},setVolume:t=>e().then((e=>e.setVolume(t/100))),isMuted:async()=>0===await i.getVolume(),isPlaying:()=>n.current,mute:()=>e().then((e=>e.mute())),unMute:()=>e().then((e=>e.unmute()))};return i})(R,B,T))),i.createElement("div",{ref:P,className:m.classes.facebookContainer},i.createElement("div",{ref:I,className:"fb-video","data-player-name":"Facebook",id:w,"data-href":n,"data-autoplay":o?"true":"false","data-allowfullscreen":"true","data-controls":c?"true":"false","data-width":k.width,"data-height":k.height,"data-testid":S}))};var Ki={dailymotion:i.forwardRef(Ri),facebook:i.forwardRef(zi),playable:Tn,vimeo:Ti,twitch:R,youtube:Ai};const qi=e=>"string"==typeof e,Qi=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:\?.*)?$/,Xi=/facebook\.com\/([^/?].+\/)?video(s|\.php)[/?].*$/,Zi=/\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i,Ji=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/,eo=/(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/,to=/vimeo\.com\/.+/,no=/(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|live\/|watch\?v=|watch\?.+&v=))((\w|-){11})/,io={dailymotion:e=>qi(e)&&Qi.test(e),facebook:e=>qi(e)&&Xi.test(e),playable:e=>{return qi(e)?Zi.test(e):(t=e,!!Array.isArray(t)&&e.some((e=>Zi.test(e))));var t},twitch:e=>qi(e)&&(Ji.test(e)||eo.test(e)),vimeo:e=>qi(e)&&to.test(e),youtube:e=>qi(e)&&no.test(e)},oo=(e,t)=>{const{onMouseEnter:o,onMouseLeave:r,reducedMotion:s,className:a,customClassNames:u=[],isConsentPolicyActive:h,isClassNameToRootEnabled:_}=e,v=!s&&e.autoplay,[y,g]=i.useState(0),[E,b]=i.useState(!1),w=(e=>{for(const t in io){const n=t;if(io[n](e))return n}return"playable"})(e.src),T="playable"===w,S=Ki[w],P=i.useCallback((()=>g(y+1)),[y]),I=i.useRef(null),O=i.useRef(null),[C,L,A,k]=d(),M=async t=>{if(!e.onStateUpdated)return;const n=t||{},i=L(),o={...i?{isPlaying:i.isPlaying(),duration:Number(await i.getDuration())}:{},...n};e.onStateUpdated({type:"onStateUpdated",state:o})};i.useImperativeHandle(t,(()=>({resetPlayerRef:()=>k(),play:()=>(b(!0),C().then((e=>e.play()))),pause:()=>C().then((e=>e.pause())),stop:()=>C().then((e=>e.stop?e.stop():P())),togglePlay:()=>(b(!0),C().then((e=>e.togglePlay()))),mute:()=>(M({isMuted:!0}),C().then((e=>e.mute()))),unmute:()=>(M({isMuted:!1}),C().then((e=>e.unMute()))),seek:e=>C().then((t=>t.seekTo(e))),setVolume:e=>{M({volume:e}),C().then((t=>t.setVolume(e))).catch((e=>{throw e}))}})));const D=p(I),N=v||D||E,x=((e,t)=>e?{}:t)("playable"!==w&&h,{id:e.id,...l(e),className:(0,m.st)(m.classes.root,a,c(f.root,...u))});return N?i.createElement("div",n()({},x,{ref:I,onMouseEnter:o,onMouseLeave:r}),i.createElement(S,n()({key:"player-"+e.src+"-"+y},e,T&&e.playableConfig,{playing:v,onProgress:t=>{const n=L();Promise.all([n.getVolume(),n.isMuted()]).then((e=>{let[n,i]=e;return M({currentTime:t,volume:n,isMuted:Boolean(i)})})),null==e.onProgress||e.onProgress({type:"onProgress"})},onDuration:e=>{M({duration:e})},onInit:()=>{A(O.current),null==e.onPlayerInitialized||e.onPlayerInitialized({type:"onPlayerInitialized"})},onPlay:()=>{M({isPlaying:!0}),null==e.onPlay||e.onPlay({type:"onPlay"})},onPause:()=>{M({isPlaying:!1}),null==e.onPause||e.onPause({type:"onPause"})},onEnded:()=>{M({isPlaying:!1}),null==e.onEnded||e.onEnded({type:"onEnded"})},ref:O}))):i.createElement("div",{id:e.id,className:(0,m.st)(m.classes.root,_&&!h?a:void 0),ref:I})};const ro=e=>e.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase()));var so;const ao={VideoPlayer:{component:i.forwardRef(oo),controller:(so=e=>{let{stateValues:t,mapperProps:n}=e;const{reducedMotion:i,experiments:o={}}=t,r=((e,t)=>!0===e[t]||"true"===e[t]||"new"===e[t])(o,"specs.thunderbolt.isClassNameToRootEnabled");return{...n,isClassNameToRootEnabled:r,reducedMotion:i,..._(t)}},{useComponentProps:(e,t,n)=>{const i=(e=>({...e,updateStyles:t=>{const n=Object.entries(t).reduce(((e,t)=>{let[n,i]=t;return{...e,[(o=n,o.startsWith("--")?n:ro(n))]:void 0===i?null:i};var o}),{});e.updateStyles(n)}}))(n);return so({mapperProps:e,stateValues:t,controllerUtils:i})}})}}}(),r}()})); //# sourceMappingURL=https://static.parastorage.com/services/editor-elements-library/dist/thunderbolt/rb_wixui.thunderbolt[VideoPlayer].86ab15dc.bundle.min.js.map